ariya/esprima — pull request #185 by benjamn (2013-06-03 21:12:25+00:00)
Title: Performance improvement from introducing a LocationMarker object type

This change gives a noticeable performance improvement on the harmony branch, when either the `loc` or the `range` parsing options are enabled.

Note that `test/benchmarks.js` does not enable either of these options, and so those benchmarks don't show any improvement with this patch applied.

When I run `node test/runner.js`, I see a consistent 38% decrease in running time (from ~1100ms to ~680ms on my machine).

When I run the same test suite in Chrome 28, the running time drops from ~1700ms to ~1200ms (a 30% decrease).

When I run the test suite in Firefox 21, the running time drops from ~2300ms to ~2000ms (a 13% decrease).

The performance win is attributable to inheriting the `end`, `applyGroup`, and `apply` methods from `LocationMarker.prototype` instead of redefining them for each instance.