Re:ARM MacBook vs. Intel MacBook: A SIMD Benchmark
by messe on Sunday December 13, 2020 @03:31PM
(#25409939)
Yep, looks like simdjson is defaulting to a generic fallback implementation. I added the following to the start of main:
When built for Intel/Rosetta, it prints:
On arm64:
simdjson's mess of CPP macros isn't properly detected ARM64. By manually setting -DSIMDJSON_IMPLEMENTATION_ARM64=1 on the command line, I got the following results:
EDIT: Interestingly, compiling with -Os nets a slight improvement to the validate benchmark:
[ Parent
| on HN ]
Re:ARM MacBook vs. Intel MacBook: A SIMD Benchmark
by tedd4u on Sunday December 13, 2020 @04:08PM
(#25410291)
Thanks for getting to the bottom of this.
Looks like -Oz bumps validate up another few percent.
% c++ -Oz -DSIMDJSON_IMPLEMENTATION_ARM64=1 -o benchmark benchmark.cpp simdjson.cpp -std=c++11
% ./benchmark
minify : 6.73381 GB/s
validate: 17.8548 GB/s