tree-sitter/lib
Alex Pinkus 679a841183 Add pointer indirection to AnalysisStateSet
Profiling the `ts_query__analyze_patterns` function shows that it
spends a lot of time copying items in its various state sets. These
state sets are kept sorted, and the items are fairly large, so any time
that we insert new entries near the front of the array, a lot of calls
to memcpy must occur.

In advance of more sophisticated rework, one easy win is to hide the
large `AnalysisStateSet` objects behind pointers, so that the size of
each item in the list goes from 68 to 8 bytes, and add an object pool to
reuse allocations. This shows a significant performance improvement for
grammars that have a lot of states in them.
2022-01-10 20:07:14 -08:00
..
binding_rust Simplify allocation-recording in test suite using new ts_set_allocator API 2021-12-30 16:09:07 -08:00
binding_web Add realloc to wasm exports 2022-01-03 16:07:39 +00:00
include/tree_sitter Simplify allocation-recording in test suite using new ts_set_allocator API 2021-12-30 16:09:07 -08:00
src Add pointer indirection to AnalysisStateSet 2022-01-10 20:07:14 -08:00
.ccls rust: Change QueryCursor::captures to expose the full match 2019-10-03 12:45:58 -07:00
Cargo.toml lib: 0.20.2 2021-12-30 16:35:21 -08:00
README.md lib: remove utf8proc dependency (#436) 2019-10-14 11:18:39 -07:00

Subdirectories

  • src - C source code for the Tree-sitter library
  • include - C headers for the Tree-sitter library
  • binding_rust - Rust bindings to the Tree-sitter library
  • binding_web - JavaScript bindings to the Tree-sitter library, using WebAssembly