Significant performance improvements#1308
Conversation
2% performance improvement
3-4% performance improvement
>4x speedup!!!
5% performance improvement
3% performance improvement
4-5% performance improvement
5-6% performance improvement
2-3% performance improvement
~3% performance improvement in getEmitPlan (mostly IO)
|
Amazing!!! |
Perryvw
left a comment
There was a problem hiding this comment.
Would have preferred if this had come in smaller incremental PRs. There are a lot of different improvement ideas mixed together now which makes it much harder to review...
I reviewed most of this but skipped some parts that seemed not finished yet. Also resolve needs a further very careful look.
6% transpilation time speedup typeToTypeNode is very slow
Perryvw
left a comment
There was a problem hiding this comment.
Why is the benchmark failing, mismatch of language extensions between master and your branch?
The benchmark is using an old version of language-extensions, so MultiReturn is not being detected. This is due to the lua-types package depending on a older version of tstl (for type definitions, not compilation). A somewhat hacky workaround I found was to add |
When benchmarking with isaccscript-common using cli, nearly halves the total time, and improves transpilation time (time spent in
transformSourceFileby a factor of 5.The most improvement was from changing checking for language-extensions from O(total number of extensions) to O(1) (which is checked at every identifier and call expression!) To do this, language extensions were separated into separate categories (
__tstlExtension,__tstlIterable, and__tstlMultiReturn), and extension type is checked by reading the string literal value of the extension property (except for__tstlMultiReturn).This rewrites/re-structures language extension calls and builtin calls, and cleans up some code/bugs found along the way.
Annotations that were deprecated have now been completely removed from being checked.