Turn on optimizations only for the core Lua files - you aren't likely to debug inside them anyway; this way you'll get a half-release-half-debug build. For a really fast allocator try TLSF: http://tlsf.baisoku.org/