Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace wrapTrackingFunction() with inline location tracking.
Summary: Apparently node is not very good at executing these wrapped functions. Bringing the code closer to the master implementation, but using local vars instead of the marker stack (markStart/markEnd/markEndIf). The idea is that all parseXXX functions should return nodes with range/loc properties set when the tracking is on (master doesn't always follows it though). I also think this implementation is easier to maintain and less error-prone than the wrapping one. I profiled it on a fairly large codebase (5k files/19MB of JS): Tracking off: master = 3.3s, harmony = 3.2s, my patch = 3.3s (harmony is slightly faster) Tracking on: master = 5.9s, harmony = 7.8s, my patch = 5.5s (makes it slightly faster than master vs 30% slower) Test Plan: npm test
- Loading branch information