With the 0.7.0 release I focused primarily on API improvements and stability. We unified the high-level API and simplified some of the inner workings of the library, which is a huge win I think for new users and for encouraging contributions.
Also, the benchmark I'm using in that jsPerf is a bit silly really. It doesn't test very many of the advanced features of mustache.js, so I can't be sure how accurate those numbers really are in real-world scenarios.
I'd like to focus on bringing performance for the 0.7.1 release back up to par with what we were doing in 0.5.2 (our fastest release to date). There are two major areas I think we can focus on:
What do y'all think? I'm actively looking for contributions in these areas, so anyone with expertise here is more than welcome to chime in. Thanks!
/cc @janl @natevw @cweider
Anyways, ouch, that needs improvement, I’ve a few patches to improve things basically inlining and decomposing the tail recursion*. One thing worth toying with are some automated performance tests to make checking the three steps of lex, generation, and execution easy.
@cweider Thanks for the suggestions. I've inlined all the rendering functions and put off the slice needed by higher order sections until it's actually needed, which provided some nice gains (look at the master branch vs. 0.7.0). I'm not sure how to go about decomposing the tail recursion though. Can you give me any pointers?