Most of the functions in imports.c are very small, to the function call overhead is large relative to their size. Can't we do something like in the attached patch and move them to imports.h and mark them static inline? Things like memcpy and memset are often optimized out by the compiler, and by hiding them in these wrapper functions, we're probably losing any benefits we'd otherwise see. Similarly, if we're going to use a magic sqrtf algorithm (apparently for speed) then shouldn't we also let the compiler properly inline the function?
I also don't quite understand wrapper functions like double _mesa_pow(double x, double y) { return pow(x, y); } Maybe at one time these had #ifdefs in them like _mesa_memcpy, but I can't see any reason not to remove it now. Someone enlighten me. Thanks, Matt Turner
move-mesa-memcpy-to-imports.h.patch
Description: Binary data
------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev