News for hackers. Stuff that matters.
Re:John Carmack on Inlined Code (2014) by specialist on Tuesday July 19, 2016 @05:07PM (#12124908)
My most recent real-life example: Jackson + Afterburner

I hand wrote a LA(1) style parser (and lexer) for JSON, because I wanted to experiment with a source code generation notion I had (vs reflection, or bytecode generation). I was surprised that in micro benchmarks, Jackson + Afterburner is still twice as fast as my stuff. I had to understand why.

Turns out it does the lex/parse equivalent of unrolling and inlining (cut and paste) absolutely everything. The code is utterly baffling.

My implementation's jar is ~30Kb, fast enough (faster than all but Jackson + Afterburner, Boon), stupid simple, and works the way I want, so I'll keep using it for my projects.

There are no comments on this comment yet.