-
Notifications
You must be signed in to change notification settings - Fork 19
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
Potential optimizations #327
Comments
It seems that creating a DepthMap is currently quite expensive and is not cached, meaning different rules generate their own DepthMap for the same segments. |
Using const fn is unlikely at the moment. We need at least compile-time HashMaps. There is an attempt to implement this in this PR, but it requires unstable features, and I’m not sure how well it actually works. The PR appears to be abandoned. |
I was also looking at some of the flame graphs, and to me, there may be two potential areas of improvement:
|
Will building with --features=jemalloc improve performance? |
the descendant_type_set should ideally be cached, at least that's how it's done in the original implementation |
We use .to_uppercase (which allocates a String) in some places for case-insensitive comparison. Instead, we could use something like |
Can i work on one of the remaining 3 tasks? |
Hey @Victorthedev, feel free to look at anything you think is valuable. Happy to support any contributions! There's still lots to do but this may be slightly out of date. Some of the ideas are still right but I would definitely try recreating that flamegraph and seeing where the opportunities lie. |
This is just a list of potential optimizations that we think could work.
Maintained list of optimizations
const fn
more of the work upfront for building of dialects, (we could potentially use Perfect Hashes)@gvozdvmozgu feel free to add any comments that you have thought of
The text was updated successfully, but these errors were encountered: