Token.* methods and runtime codegen optimizations#12
Conversation
Token.* methods and runtime codegen optimizations
sinclairzx81
left a comment
There was a problem hiding this comment.
So, have had a look at the PR, and keen to try out these optimizations!
I have had to flag a few format related issues though. Mostly the intention here is to try keep the number of edits to an absolute minimum so that it's possible to focus on the optimizations only (the exact functional updates) and reduce the PR footprint to only significant edits (the format changes add a lot of noise to the PR)
In all though, I am keen to try these updates out! The replacement of the if logic over the IIFE closures for ternary expressions i expect could improve performance (so would be keen to test these with associated benchmarks). If extra performance can be attained, can probably consider establishing a consistent symmetric pattern to replace ternary ?: for if).
Good work! :)
|
@sinclairzx81 maybe I should do the runtime codegen in a different PR |
|
@aquapi Thanks so much for this! This was an awesome bit of research into ParseBox optimization. Upstream testing showed 2-3x performance for TypeBox Script Parse which is amazing! I have selected the parts of this PR I can incorporate for now, those being:
And added you as a co-contributor for 0.11.3 via PR #14. This is amazing work! Thanks for taking the time to review! Will close this PR out via #14 |
Optimize
Token.*methods and runtime code generator