Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In addition to #126 this PR takes into account also integers and treats them same way as strings when it comes to optimization.
Normally, the "integers only" optimization would be applied as well, but it is preempted by the earlier existence optimization, preventing it from being triggered.
Code excerpt for the record:
(inverted optimization ruin performance, should be avoided. Existence should be the first)
Motivation
Vix: It turns out that this change speeds up the calculation by further 31% compared to the first (strings only) optimization step.
All Non-Vix routers: from 321.8 seconds down to 239.2 seconds, which is 25% (relative to string only optimization) or 264.2 seconds down to 239.2 seconds which is only 9.5% faster.
Conclusion this PR fixes the performance for non-Vix LFRs which got ruined by the first optimization.
Overall
Vix: 62% faster
Slowest vix: 27x faster
Non-vix: 9.5% faster