(honestly idk what I'm doing, but you never know what you are doing until you try anyway, so who cares) don't tell anyone but this is just an excuse for me to learn simd stuff(idk what it's)
This project is a wild ride into the world of primitive optimization. We're throwing ideas at the wall and seeing what sticks. Our main weapon of choice? SIMD (Single Instruction, Multiple Data) - because why not make things go zoom?
- Early support for arm neon
- Take a look at Alloy primitives
- Scratch our heads and wonder how to make them faster
- Remember that SIMD exists and seems cool
- Try to apply SIMD to... something. Anything, really.
- See what happens and hope for the best
- Implement Vector operations
- Clone this repo
- Install... things. (We'll figure out what exactly later)
- Run some code and see if it explodes
- If it doesn't explode, check if it's faster
- If it's faster, celebrate! If not, pretend you meant to do that
Primitive | SIMD(Primitives) | Alloy Primitives | Performance Change |
---|---|---|---|
address/checksum | 169.43 ns | 201.41 ns | Faster by ~23% |
bytes/32 | 13.818 ns | 15.818 ns | Faster by ~14% |
bytes/64 | 14.614 ns | 17.667 ns | Faster by ~21% |
bytes/128 | 36.106 ns | 36.859 ns | Slightly faster by ~2% |
bytes/256 | 42.191 ns | 41.024 ns | Slower by ~2.8% |
We've recently added SIMD optimizations for Parity inversion. Here are the benchmark results:
Input Size | Alloy Primitives | SIMD Version | Performance Change |
---|---|---|---|
10 | 21.235 ns | 23.258 ns | Slower by ~9.53% |
100 | 101.93 ns | 85.767 ns | Faster by ~15% |
1000 | 974.07 ns | 722.84 ns | Faster by ~25% |
10000 | 10.090 μs | 8.007 μs | Faster by ~20% |
Key observations:
- SIMD shows overhead for very small inputs(stick with the non simd version)
- Performance gains become significant for larger inputs (1000+)
- Consistent ~20-25% improvement for large inputs
Got ideas? Throw them in! Know what you're doing? Even better, we could use the help!
Probably something open source. We'll figure it out.
This project is inspired by the Alloy primitives developed by the Paradigm team. We aim to build upon their work to further optimize Ethereum's core functionality.
(They seem to know what they're doing, unlike us)
By the DARE research team, you've never heard of it I know but give it a year... nahhh I mean two years.