Needed to pre allocate buffer to get good performance.

Somehow this enables LuaJIT to compile more code.