[pull] master from ruby:master - #1310
Merged
Merged
Conversation
We need extconf to detect which SIMD features the compiler and processor support, then we can compile in SIMD support for BLAKE3 ruby/digest@6865b37d30 Co-Authored-By: Jean Boussier <jean.boussier@gmail.com>
Instead of iterating over the bytes of the ar_table hints one by one, we can use a little bit of SWAR code to match them all at once and return the first matching byte index. In theory we could even re-use the mask to extract all matching position, however we can't do that because since `ar_equal` calls back into Ruby, the hints may change after every iteration. ``` compare-ruby: ruby 4.1.0dev (2026-08-06T14:05:57Z master 9658933) +YJIT +PRISM [arm64-darwin25] built-ruby: ruby 4.1.0dev (2026-08-06T16:42:50Z ar-find-entry-swar-2 723ff01) +YJIT +PRISM [arm64-darwin25] ``` | |compare-ruby|built-ruby| |:-----------|-----------:|---------:| |hit_first | 13.891M| 15.085M| | | -| 1.09x| |hit_third | 13.322M| 15.065M| | | -| 1.13x| |hit_fourth | 12.759M| 14.410M| | | -| 1.13x| |hit_last | 11.545M| 15.275M| | | -| 1.32x| |miss | 10.872M| 16.286M| | | -| 1.50x|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )