This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC performance regression - its memset !
> On Mon, Apr 22, 2002 at 04:59:53PM -0700, Richard Henderson wrote:
> > See whether or not disabling glibc's inline expansion of
> > memset affects 2.95 vs 3.x with -D__NO_STRING_INLINES.
>
> I can get gcc 2.95 to be as slow as 3.1 snapshot by using both
> -fno-builtin and -D__NO_STRING_INLINES
>
> but, I cant get gcc 3.1 to do the inlining for me
>
> If I dont use -fno-builtin -D__NO_STRING_INLINES, and just compile with -O3,
> gcc 2.95 generates this:
>
> movl $table+2,%edi
> cld
> movl $31,%ecx
> rep
> stosl
> stosw
>
> while 3.1 snapshot generates this:
>
> movl $table+2, (%esp)
> movl $0, 4(%esp)
> movl $126, 8(%esp)
> call memset
I guess the inlining threshold is too low or the default memset implementation
too lame.
I was tunning it for Athlon, so the mileage may warry from CPU to CPU.
I will investigate the misscompilation first and check this second.
Honza
>
> Hope this helps,
>
> --
> Michel "Walken" LESPINASSE
> Is this the best that god can do ? Then I'm not impressed.