Crate boa_interner

source ·
Expand description

Boa’s boa_interner is a string interner for compiler performance.

Crate Overview

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.

About Boa

Boa is an open-source, experimental ECMAScript Engine written in Rust for lexing, parsing and executing ECMAScript/JavaScript. Currently, Boa supports some of the language. More information can be viewed at Boa’s website.

Try out the most recent release with Boa’s live demo playground.

Boa Crates

Modules

Structs

Enums

Traits