Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
perf-ninja-rs
Rust port of dendibakh/perf-ninja - an online course where you can learn and master the skill of low-level performance analysis and tuning.
Not that I know of! As part of compact_str v0.6 we tried to make the API of CompactString 1:1 with String, inevitably we missed a few (1, 2, 3) things but they were fixed in this latest release.
I didn't use any inline asm, instead I wrote the simplest if statement possible, which I confirmed on x86_64, x86, and aarch64 compiles down to use the platform's supported conditional move instructions. If this changes in the future and there's a need to write inline asm, you can do so in a portable way, e.g. the cmov crate.
Checkout Pattern types MVP, it will enable such use cases without enumerating every possible value.
For benchmarking I follow the guide at grahamking/perf-ninja-rs. They detail how to disable hyper threading, pin execution to a single core, and other things, so you can create an environment for the most accurate and repeatable testing.