This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: is g++ 3.1 too slow?
- From: Reza Roboubi <reza at linisoft dot com>
- To: gcc_bugs <gcc-bugs at gcc dot gnu dot org>
- Date: Wed, 07 Aug 2002 12:09:14 -0700
- Subject: Re: is g++ 3.1 too slow?
- Organization: Linisoft
- References: <3D516C3E.D53477E5@linisoft.com>
Reza Roboubi wrote:
> simple enough. I put it on my web site:
>
> http://www.linisoft.com/test/test.ops.cc
Ah well, all this goes on the archive, so the right thing might be to
copy test.ops.cc here:
test.ops.cc
============
#include <stdio.h>
int j=10;
class o
{
public:
int i;
o(int ii)
{
i=ii;
}
o(const o &oo)
{
i=oo.i;
}
o operator +(o oo)
{
return o(i+oo.i+(j+=10));
}
};
int main()
{
o(1)+o(2)+o(3);
o(1)+o(2)+o(3);
o(1)+o(2)+o(3);
... //same line must repeat about 440 times
return 0;
}