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

Vectorize CharacterMap.IndexOfOpeningCharacter #622

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

MihaZupan
Copy link
Collaborator

@MihaZupan MihaZupan commented Apr 15, 2022

A 1-2.5% improvement for parsing (on x86 LE hardware only for now)

For long runs without an opening character, the vectorized loop is ~8x faster.

Method AdvancedPipeline Mean Error StdDev Median
Parse False 262.6 us 0.73 us 3.64 us 263.5 us
Parse True 366.9 us 0.43 us 2.16 us 367.2 us
Method AdvancedPipeline Mean Error StdDev
Parse False 259.5 us 0.18 us 0.91 us
Parse True 357.9 us 0.41 us 2.06 us

@xoofx xoofx merged commit 891e2fc into xoofx:master Apr 20, 2022
@xoofx
Copy link
Owner

xoofx commented Apr 20, 2022

Nice!

@MihaZupan
Copy link
Collaborator Author

Some good news, this now turned into a discussion about where we can improve the existing helper methods in .NET: dotnet/runtime#68328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants