-
Notifications
You must be signed in to change notification settings - Fork 91
Closed
Description
I don't know why, but for some reason the SIMD core primitives are not being inlined if I build simd-json with stable Rust. It works fine with nightly (2021-04-23) though.
Stable:
$ cargo clean; RUSTFLAGS="-C target-cpu=native" cargo asm --rust simd_json::Deserializer::from_slice_with_buffers|grep core::
call core::core_arch::x86::avx::_mm256_setzero_si256
call core::core_arch::x86::avx::_mm256_setzero_si256
call core::core_arch::x86::avx::_mm256_setzero_si256
call core::core_arch::x86::avx::_mm256_loadu_si256
[... 126 more lines elides ...]
Nightly:
$ cargo +nightly clean; RUSTFLAGS="-C target-cpu=native" cargo +nightly asm --rust simd_json::Deserializer::from_slice_w
ith_buffers|grep core::|wc -l
0
This leads to much worse performance on stable.
Benchmarks
Stable:
apache_builds/simd_json::to_tape
time: [372.11 us 373.84 us 376.01 us]
thrpt: [334.02 MiB/s 335.95 MiB/s 337.52 MiB/s]
Nightly:
[...]
apache_builds/simd_json::to_tape
time: [67.727 us 68.317 us 68.884 us]
thrpt: [1.7805 GiB/s 1.7953 GiB/s 1.8109 GiB/s]
[...]
Metadata
Metadata
Assignees
Labels
No labels