-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Less_Parser: Port faster matching with
matchStr()
method
There are various parse methods in our codebase still using `matchReg` (equivalent to `parserInput.$re` in Less.js), whereas the reference implementation now uses `parserInput.$str` for various simple sequences. This was done upstream in commit less/less.js@1a33bc69f8 as part of less/less.js#1615, which we did not port until now. For us it does not appear to provide a consistent speed-up, via test/bench.php. It makes less than 1% difference and varies in which direction. The motivation for this change is primarily code parity. I suspect the reason upstream saw a bigger difference is that they combined it with various other optimizations, which we have already ported, such as the Visitor cache, and optimised parseEntitiesQuoted method. Change-Id: I9553c46f0fb3cc6f985d18b577c3948efd48805b
- Loading branch information
Showing
1 changed file
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters