It is still bad that it allocates more than 300k of heap, and then it doesn't even use most of it. I have a prototype of (4) at http://reviews.llvm.org/differential/diff/14336/ Haven't benchmarked it yet. http://reviews.llvm.org/D5577