> >
> > I'm not sure what the rules are for using bzero, something may probably have
> > to be added to configure to support/not support this. (bzero is much faster
> > than memset on freebsd)
> >
> > Please let me know if you have any comments or suggestions.
>
> I'm not 100% sure bzero() is as common as memset(). So, I'm adding
> a BZERO() macro which evaluates to bzero() on FreeBSD but evaluates
> to memset() on everything else.
>
> Thanks for the patches, I'll apply them soon to Mesa 3.2 and 3.3.
>
> -Brian
>
Ok. There are a few other places where bzero could probably be used too, but
as a general rule, unless you're bzero'ing 512 bytes or more, the overhead
is greater than the speed savings. It is a syscall, so it's not 'free'.
In FreeBSD, on a 586 or higher, bzero is implemented using floating point
registers, and is up to 5x faster than using an integer based fill. (At
least on the Celerons we're using in our production). The speed increase
largely depends on what's in the cache and what isn't.
FYI, from the bzero(3) man page:
HISTORY
A bzero() function appeared in 4.3BSD.
So, it's probably safe to bet that {Free,Net,Open}BSD has bzero.
I'm likely to be doing some more optimizations in glClear and OSMesa if I
can find any. In our case, glClear is still using 30-40% of our CPU time,
which just feels wrong.
-- Kevin
_______________________________________________
Mesa-bug maillist - [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-bug
_______________________________________________
Mesa-dev maillist - [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev