Closed RCasatta closed 6 months ago
In #79 I tried rocksdb dynamic linking with distro-provided rocksdb (sudo apt install librocksdb-dev libsnappy-dev) with great compile-time results but very disappointing bench results:
ROCKSDB_LIB_DIR=/usr/lib/ cargo +nightly bench
...
Finished bench [optimized] target(s) in 36.93s
...
test bench_db_batch ... bench: 42,473,786 ns/iter (+/- 4,740,588)
test bench_db_no_batch ... bench: 42,864,041 ns/iter (+/- 3,682,106)
cargo +nightly bench
...
Finished bench [optimized] target(s) in 4m 12s
...
test bench_db_batch ... bench: 1,090,659 ns/iter (+/- 35,234)
test bench_db_no_batch ... bench: 1,901,121 ns/iter (+/- 116,950)
of interests: @dpc
40x ? WTH :D
It's hard to explain such a huge difference by even bad FFI alone. Are the versions being used the same, etc.? I mean 40ms per iteration seems more like some IO issue level of difference.
Are the versions being used the same, etc.?
No, however, I don't think such a difference could be associated only to version differences...
Nix users now do dynamic linking via the flake.nix configurations. It's activated for both development and also for the released version because benches now performs the same so it was probably some issue in that version
_Originally posted by @dpc in https://github.com/RCasatta/blocks_iterator/issues/67#issuecomment-1474042625_