-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Improve parsing performance #29
Conversation
Seems to be failing tests. Also, some benchmarking would be nice. I can add some Benchmarks later (although benchmarking is a bit of a dark science - easy to get wrong). |
Here are results for current master:
Master:
Perf branch:
All in all those are some nice speedups. |
- In LinguiniParser, ZeroCopyReader, ZeroCopyUtil: change helpers from dealing in ReadOnlyMemory<char> to char. In inner loops this removes a lot of redundant checks for a span of length 1 and inlines more readily. - In ZeroCopyReader add helpers for SeekEol, IndexOfAnyChar. These use existing helper methods of Span that are SIMD accelerated to search for indexes quickly. These provide significant speedups compared to incrementing the index in a loop. - In FluentBundle.AddResourceOverriding, provide a specialized 'override' method to avoid two dictionary lookups and allocating an empty list.
Ok, expect a release soonish. Need to write changelog. |
@Ygg01 looks like the action failed partway through pushing to nuget, just a ping in case you hadn't noticed: https://github.com/Ygg01/Linguini/actions/runs/5237132620 |
Yeah, I manually deployed them. I need to sort that deployment script. Look at repo readme , the versions of |
May I request |
This makes parsing performance 1.5x faster. On my machine, the following test project runs in 2.9 seconds, compared to 4.5 seconds previously.
Test Project
I used the following test files, but feel free to try with whatever you have to hand.