Skip to content

Commit

Permalink
Add string interner (#269)
Browse files Browse the repository at this point in the history
* Add string interner

* Switch to fxhash

* Use interning for function names

* Make interner global

* Buffer interner

* Store symbol table in Arc

* Remove redundant stuff

* Cache imports
  • Loading branch information
Glyphack authored Oct 17, 2024
1 parent dff6ac5 commit 822399e
Show file tree
Hide file tree
Showing 20 changed files with 1,028 additions and 317 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ reqwest = { version = "0.12.7", features = ["blocking"] }
dashmap = "6.0"
tracing = "0.1.40"
tracing-subscriber = {version = "0.3.18", features = ["env-filter"]}
fxhash = "0.2.1"

[profile.dev.package.insta]
opt-level = 3
Expand Down
2 changes: 1 addition & 1 deletion enderpy/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn symbols(path: &Path) -> Result<()> {
manager.build(root);
manager.build_one(root, path);

println!("{}", manager.get_symbol_table(path));
println!("{}", manager.get_symbol_table_by_path(path));

Ok(())
}
Expand Down
1 change: 1 addition & 0 deletions parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ unicode-id-start = "1.2"
miette.workspace = true
thiserror = "1.0.40"
is-macro = "0.3.6"
fxhash.workspace = true

[dev-dependencies]
codspeed-criterion-compat.workspace = true
Expand Down
Loading

0 comments on commit 822399e

Please sign in to comment.