mirror of
https://github.com/RGBCube/cstree
synced 2025-07-29 18:17:44 +00:00
Performance Improvements (#43)
- add `Language::static_text` and optimize static tokens - re-use existing `ThinArc`s in `GreenNodeBuilder::finish_node` - replace `*mut` in `SyntaxNode` with `NonNull` - add CHANGELOG
This commit is contained in:
parent
9be9dc9597
commit
e7b00a603e
20 changed files with 575 additions and 371 deletions
8
CHANGELOG.md
Normal file
8
CHANGELOG.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Changelog
|
||||
|
||||
## `v0.12.0`
|
||||
|
||||
* Introduced `Language::static_text` to optimize tokens that always appear with the same text (estimated 10-15% faster tree building when used, depending on the ratio of static to dynamic tokens).
|
||||
* Since `cstree`s are lossless, `GreenNodeBuilder::token` must still be passed the source text even for static tokens.
|
||||
* Internal performance improvements for up to 10% faster tree building by avoiding unnecessary duplication of elements.
|
||||
* Use `NonNull` for the internal representation of `SyntaxNode`, meaning it now benefits from niche optimizations (`Option<SyntaxNode>` is now the same size as `SyntaxNode` itself: the size of a pointer).
|
Loading…
Add table
Add a link
Reference in a new issue