Repository navigation
remove SIMD dep to get less method invalidations - #146
Merged
Merged
Conversation
Member
|
Rad, thanks for this! LGTM, but Jakob should probably do the final approval |
Member
|
Super cool, thank you very much. This is indeed much better. Automa's current SIMD capabilities are the end of a long, bitter journey where I've increasingly scaled back ambitions, and rolled back improvements, as I found out Julia's support for explicit SIMD is not great at the moment. While it's slightly sad to see the SIMD completely disappear, I do agree it's for the better since the current implementation was no better than SIMD produced by the autovectorizer in this PR. |
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.
Remove the SIMD.jl dependency
While looking into Makie method invalidations, SIMD was a big invalidator
(its broad Base operator methods like
>(::Union{Bool, Int8, ...}, ::Vec)invalidate a lot of compiled code in unrelated packages, we traced
multi-second recompilations of an HTTP server to it), and since we depend on
Automa indirectly via MathTeXEngine, it seemed easiest to just remove that
dependency here.
SIMD.jl was only used in
generate_simd_loop. It now emits a branch-free,fixed 32-iteration loop instead, which LLVM auto-vectorizes to the same
vector code. Judged with BenchmarkTools (validator over ~1MB inputs, medians):
judge[a-z]+runs[A-Za-z0-9_]+Note: the skip loop now respects
--check-bounds=yes(the rawvloadbypassed it), so benchmark with default flags.
Benchmark script
Run with
julia bench.jl out.jsonon master and on this branch, then comparewith
judge: