hot path optimizations in uma_zalloc() & uma_zfree()

Simon 'corecode' Schubert corecode at
Mon Jul 4 07:25:41 GMT 2005

Lately Nikos Ntarmos <ntarmos at> said:
> Ummm... What compiler version are you use? The pointer variant produces
> faster code for me on both NetBSD/alpha (gcc 3.3.3) and Linux/x86 (gcc
> 3.3.5), using both -O0 and -O2 (other compiler flags also tested with
> similar results). Perhaps something specific to FreeBSD then? I guess
> I'll have to set up a FBSD box and have a look at it, when I catch up
> with some of the other stuff in my todo list...

This is micro-optimization at its best. I doubt it has any influence in
real world scenarios. And if it does, something else is extremely broken.
You don't want to takt the route and implement it in assembler?

Besides, I guess it's totally CPU dependant, how stuff can be pipelined,
all memory locations ought to be in the cache anyways.


Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low $$$ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |      Against  HTML   \
Dude 2c 2 the max   !       Mail + News   / \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the freebsd-hackers mailing list