Compiling with checks and assertions

Some people like to complain about greturniffail() and gassert() being left in when compiling release executables and libraries. I have learned that it can actually have a positive effect on performance, as it can start pre-fetching that data into cache-lines. To get the performance I lost by compiling with -DGDISABLEASSERT and -DGDISABLECHECKS I had to resort to the GCC builtin function _builtinprefetch (Cast checks will occur a bit more overhead, but I'm not using that here).

Most interesting. Just something to think about.

-- Christian Hergert 2012-12-31

Back to Index