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

Download history 100/week @ 2022-12-09 160/week @ 2022-12-16 110/week @ 2022-12-23 79/week @ 2022-12-30 97/week @ 2023-01-06 58/week @ 2023-01-13 73/week @ 2023-01-20 132/week @ 2023-01-27 269/week @ 2023-02-03 118/week @ 2023-02-10 803/week @ 2023-02-17 1340/week @ 2023-02-24 1234/week @ 2023-03-03 1668/week @ 2023-03-10 1625/week @ 2023-03-17 1033/week @ 2023-03-24

5,710 downloads per month
Used in 4 crates (2 directly)

Unlicense/MIT

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