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

Move simd under a feature flag, use fast CharLookup if not enabled #6

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

Wonshtrum
Copy link
Contributor

@Wonshtrum Wonshtrum commented Aug 15, 2023

SIMD makes parsers 2 times faster in "pre-body phase". But it uses x86-specific instructions, making it not compilable on other architectures (see #4). This commit:

  • puts all x86 instructions in "_simd" suffixed functions
  • declares non-suffixed functions that use "simple" (but fast) char lookups
  • declares "_fast" suffixed functions that use the fastest available functions (simd if enabled, char lookup as a fallback)

This also allows for other architecture-specific optimizations by declaring other suffixed functions and adding them to the "_fast" suffixed ones with a feature flag.

@FlorentinDUBOIS FlorentinDUBOIS merged commit 3f3e116 into main Aug 16, 2023
@FlorentinDUBOIS FlorentinDUBOIS deleted the arm_support branch August 16, 2023 08:18
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