Josef Haider
Josef Haider
I would say that this is to be expected, since line anchors are more complex than global anchors - for example: `/\Aabc\z/` is equivalent to `"abc".equals(SUBJECT)`, which of course is...
I see what you mean, and i'll put it on the list of possible future optimizations, but keep in mind that optimizations like this are speculating on the input string's...
Thanks for the analysis! Could you provide a list of the regexes using `^` and `$` encountered in this experiment?
Unfortunately, adding this speculation is not as straightforward as shown in the example above, i'll come back to this as soon as my schedule allows
> @djoooooe could you please assign someone to review this PR? let me know if you need me to mirror it to bitbucket. Thank you Yes, please mirror this PR...
Fixed by https://github.com/oracle/graal/commit/a96499b969fafe723091f17361e7f7b62cf2b3eb . Graaljs is now ~20x faster than V8 when searching for `/["'&]/` in 4KB of lorem ipsum.
I'd suggest using the Trie without `FileSystem#getPathMatcher`, since java.util.Pattern is far from ideal in situations where just a simple call to `String#indexOf('/')` would most likely already suffice.