facebook/esprima — pull request #12 by asukhachev (2014-03-19 21:18:43+00:00)
Title: Speed up the AST parsing with loc/range tracking.

Summary: https://code.google.com/p/esprima/issues/detail?id=500

filterGroup was very inefficient. It was introduced to fix
https://code.google.com/p/esprima/issues/detail?id=345.
Fixing the same issue in a different (more efficient way) by inlining
the location tracking directly into parseBinaryExpression. The marker
tracking code was taken from the master branch.

The AST parsing with loc/range tracking went from 55s to 30s on a fairly
large (19MB/5000 files) JS codebase.

"npm tests" passes.