boa_interner is a string interner for compiler performance.
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
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
Try out the most recent release with Boa’s live demo playground.
boa_ast- Boa’s ECMAScript Abstract Syntax Tree.
boa_engine- Boa’s implementation of ECMAScript builtin objects and execution.
boa_gc- Boa’s garbage collector.
boa_interner- Boa’s string interner.
boa_parser- Boa’s lexer and parser.
boa_profiler- Boa’s code profiler.
boa_icu_provider- Boa’s ICU4X data provider.
boa_runtime- Boa’s WebAPI features.
- The string interner for Boa.
- A double reference to an interned string inside
- The string symbol type for Boa.
- An enumeration of all slice types
Internercan internally store.
- Implements the display formatting with indentation.
- Converts a given element to a string using an interner.