Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Fx Hash to speed up hash maps in the compiler #356

Closed
Razican opened this issue May 1, 2020 · 1 comment · Fixed by #368
Closed

Use Fx Hash to speed up hash maps in the compiler #356

Razican opened this issue May 1, 2020 · 1 comment · Fixed by #368
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed performance Performance related changes and issues
Milestone

Comments

@Razican
Copy link
Member

Razican commented May 1, 2020

We currently use standard library hash maps (std::collections::HashMap) in Boa to organize all of our internal slots and more. This is not very performant, and Fx Hash has just a bit lower DoS resistant, while providing much better performance.

We do not care about DoS in a compiler, usually, so this should improve our performance greatly, especially during the execution.

@Razican Razican added help wanted Extra attention is needed good first issue Good for newcomers performance Performance related changes and issues labels May 1, 2020
@Razican
Copy link
Member Author

Razican commented May 2, 2020

I did a bit of profiling with callgrind, and more than 10% of our instructions are related to HashMaps, so I'll try to do this optimisation for a quick win :)

I will use rustc-hash, that seems to be the maintained version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed performance Performance related changes and issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant