Add branchless is_alnum borrowed from MSVC++'s std::regex' _Is_word#823
Merged
ras0219-msft merged 1 commit intomicrosoft:masterfrom Aug 1, 2018
BillyONeal:dev/bion/isalnum_perf
Merged
Add branchless is_alnum borrowed from MSVC++'s std::regex' _Is_word#823ras0219-msft merged 1 commit intomicrosoft:masterfrom BillyONeal:dev/bion/isalnum_perf
ras0219-msft merged 1 commit intomicrosoft:masterfrom
BillyONeal:dev/bion/isalnum_perf
Conversation
…should be about 5x faster. The _Is_word change resulted in the following results in microbenchmarks; the previous is_alnum looks like branching_ranges. .\word_character_test.exe 08/01/18 16:33:03 Running .\word_character_test.exe Run on (12 X 2904 MHz CPU s) CPU Caches: L1 Data 32K (x6) L1 Instruction 32K (x6) L2 Unified 262K (x6) L3 Unified 12582K (x1) -------------------------------------------------------- Benchmark Time CPU Iterations -------------------------------------------------------- strchr_search 19426572900 ns 19421875000 ns 1 branching_ranges 7582129000 ns 7578125000 ns 1 branching_search 6592977800 ns 6593750000 ns 1 table_index 1091321300 ns 1078125000 ns 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Should be about 5x faster.
The _Is_word change resulted in the following results in microbenchmarks; the previous is_alnum looks like branching_ranges.