3 releases (breaking)
0.16.0 | Sep 25, 2022 |
---|---|
0.15.0 | Jun 10, 2022 |
0.14.0 | Mar 15, 2022 |
#628 in Data structures
5,710 downloads per month
Used in 4 crates
(2 directly)
23KB
367 lines
String interner for Boa.
The idea behind using a string interner is that in most of the code, strings such as
identifiers and literals are often repeated. This causes extra burden when comparing them and
storing them. A string interner stores a unique usize
symbol for each string, making sure
that there are no duplicates. This makes it much easier to compare, since it's just comparing
to usize
, and also it's easier to store, since instead of a heap-allocated string, you only
need to store a usize
. This reduces memory consumption and improves performance in the
compiler.
Dependencies
~1.2–1.6MB
~37K SLoC