In my testing branch human-readable-perf, I replaced the current Arc<Mutex<Connection>> pattern with a background thread receiving a command and a oneshot channel, to send result back
And the replacement will increase average performance of insertion by 12.5%, see report-.zip generated by wastebin-bench.
TL;DR: from ~40k QPS to ~45k QPS, benched on i7-12700H running archlinux (mainline kernel)
cargo r -r -- --host http://127.0.0.1:8088 --run-time 30
The main cost is readability of the code (I did not find a design not such ugly for now)
As it's just for performance test, only insert is implemented in the -perf branch.
In my testing branch human-readable-perf, I replaced the current
Arc<Mutex<Connection>>pattern with a background thread receiving a command and a oneshot channel, to send result backAnd the replacement will increase average performance of insertion by 12.5%, see report-.zip generated by
wastebin-bench.The main cost is readability of the code (I did not find a design not such ugly for now)
As it's just for performance test, only
insertis implemented in the -perf branch.