Details
-
Enhancement
-
Resolution: Fixed
-
P5
-
None
-
None
-
b82
Description
This is a minor issue, but it helps improve parse time a bit for some of the larger scripts out there.
Currently the token buffer in TokenStream grows linearly (256 elements at a time). For some scripts such as octane/pdfjs.js this requires several hundred reallocations. We can reduce this by growing the buffer exponentially, e.g. doubling its size each time.
For pdfjs.js this reduces parse time by about 200 ms (from ca. 1240 ms down to 1040).
Currently the token buffer in TokenStream grows linearly (256 elements at a time). For some scripts such as octane/pdfjs.js this requires several hundred reallocations. We can reduce this by growing the buffer exponentially, e.g. doubling its size each time.
For pdfjs.js this reduces parse time by about 200 ms (from ca. 1240 ms down to 1040).