ariya/esprima — pull request #238 by ikarienator (2014-04-02 18:21:59+00:00)
Title: Linear comment attachment

Linear comment attachment to replace the quadratic comment attachment algorithm.

Before:

|Source|Size(KiB)|Time(ms)|
|:--:|--:|--:|
|Underscore 1.5.2|42.50|31.30|
|Backbone 1.1.0|58.70|60.02|
|MooTools 1.4.5|156.70|211.06|
|jQuery 1.9.1|262.10|1461.83|
|YUI 3.12.0|330.40|759.88|
|jQuery.Mobile 1.4.2|442.20|3713.60|
|Angular 1.2.5|701.70|1175.43|
|Total|1,994.30|7,413.12|

After:

|Source|Size(KiB)|Time(ms)|
|:--:|--:|--:|
|Underscore 1.5.2|42.5|5.32|
|Backbone 1.1.0|58.7|5.63|
|MooTools 1.4.5|156.7|34.49|
|jQuery 1.9.1|262.1|73.43|
|YUI 3.12.0|330.4|52.64|
|jQuery.Mobile 1.4.2|442.2|116.35|
|Angular 1.2.5|701.7|92.77|
|Total|1994.3|380.63|

Speed up: **13.7x**
Note that this is only 2x slower than without comment attachment.