-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
perf(es/ast): Use Atom
in some places
#5271
Conversation
@kwonoj As it's a type, |
Atom
in some placesAtom
in some places
Argh! I'm too late to the party. You move so damn fast! I had an idea about how it might be possible to combine the advantages of In short: have a shared-across-threads static set (read only, so no mutex required) pre-populated with common words + a per-thread dynamic set (for words not in the static set). The static set could use perfect hashes, and the dynamic set not. Both could use the faster FxHasher. However, work is completely crazy today so it'll have to wait until weekend for me to outline this idea further. I'll open an issue as soon as I have time. |
I merged it after verifying the performance of other operations, but yeah, I only used |
Quick thought: Since the |
Nope. they are moved across threads |
Description:
As this is tradeoff of comparison/hash time and global lock, I decided to use
Atom
for only places I can be sure.Related issue (if exists):