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 indexmap instead of linked hashmap, switch hasher to use ahash #293

Merged
merged 4 commits into from
Nov 17, 2021

Conversation

jupyterkat
Copy link
Contributor

@jupyterkat jupyterkat commented Oct 29, 2021

ahash is straight up faster for string hashing
indexmap is at least maintained and has methods that we use, also faster iteration.

before:
before
after:
image

@SpaceManiac
Copy link
Owner

I saw a much smaller speedup on my machine, over several trials: dreamchecker average time from 5.946s to 5.794s, dm-langserver average time from 6.488s to 6.344s. Not nothing, but not as drastic as you reported. Can you try doing a few extra trials so we can find out if it your numbers were a fluke (disk cache can be a big confounder), or if there's a difference between our machines?

@jupyterkat
Copy link
Contributor Author

might be because your machine just doesn’t support AES-NI like most modern machines do. have you tried on larger codebases where the extra seconds matter more

@SpaceManiac
Copy link
Owner

As far as I can tell my processor does support AES-NI. I was testing on /tg/station.

@SpaceManiac SpaceManiac merged commit eb667c3 into SpaceManiac:master Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants