Closed erictraut closed 1 month ago
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
You mentioned elsewhere you weren't seeing quite the same speed improvement results as in https://github.com/microsoft/TypeScript/pull/58928. One thing to note is that @dragomirtitian actually made three broader changes in that PR, and managed to untangle them into 3 separate PRs:
According to https://github.com/microsoft/TypeScript/pull/58928#issuecomment-2216956874, the win in monomorphizing types was the best one.
From this PR, it looks like you mostly changed syntax nodes. If you're seeing a \~5% improvement on average that probably checks out, though there might be other factors at play here too.
@DanielRosenwasser, thanks for the additional info. I didn't realize that the changes in typescript went beyond syntax nodes. Yes, I suspect that making the type objects monomorphic will have a bigger impact than the parse nodes. It's a heavier lift to make that change, but it could be worth it.
…me fields with the same layout). This helps the V8 engine optimize performance.