This PR is for documentary reasons. I don't plan to land this change.
The PR removes the uses of Vec<T> with ThinVec<T> in the AST to shrink the AST node sizes. The hope was that this would improve performance, but the performance remains unchanged.
The reason why I do not recommend merging this PR is because ThinVec s cannot easily be passed to C or Python (with PyO3) which outweighs any potential memory gains from this.
This PR is for documentary reasons. I don't plan to land this change.
The PR removes the uses of
Vec<T>
withThinVec<T>
in the AST to shrink the AST node sizes. The hope was that this would improve performance, but the performance remains unchanged.The reason why I do not recommend merging this PR is because
ThinVec
s cannot easily be passed to C or Python (with PyO3) which outweighs any potential memory gains from this.Results from running ruff (https://github.com/RustPython/Parser/pull/34)
The performance improves a bit compared to the baseline but not meaningfully.