Cargo Features
[dependencies]
bilrost = { version = "0.1010.1", default-features = false, features = ["std", "derive", "detailed-errors", "extended-diagnostics", "no-recursion-limit", "third-party-type-support", "arrayvec", "bytestring", "hashbrown", "smallvec", "thin-vec", "tinyvec", "auto-optimize", "auto-self-copy-optimization", "self-copy-optimization", "auto-unroll-varint-encoding", "unroll-varint-encoding", "full-test-suite", "pprof"] }
- default = auto-optimize, derive, detailed-errors, std
-
These default features are set whenever
bilrost
is added without
somewhere in the dependency tree.default-features = false - std default
- derive default full-test-suite?
-
Enables bilrost-derive
- detailed-errors default full-test-suite?
-
Enables thin-vec
- extended-diagnostics full-test-suite?
-
Enables const_panic
- no-recursion-limit
- third-party-type-support full-test-suite? = arrayvec, bytestring, hashbrown, smallvec, thin-vec, tinyvec
- arrayvec third-party-type-support?
-
Enables arrayvec
- bytestring third-party-type-support?
-
Enables bytestring
- hashbrown third-party-type-support?
-
Enables hashbrown
- smallvec third-party-type-support?
-
Enables smallvec
- thin-vec third-party-type-support?
-
Enables thin-vec
- tinyvec third-party-type-support?
-
Enables tinyvec
- auto-optimize default = auto-self-copy-optimization, auto-unroll-varint-encoding
-
Optimization controls. "auto-optimize" enables the default setting for all optimizations.
- auto-self-copy-optimization auto-optimize
-
Self-copy optimization: This causes copies of short segments of bytes into the prepend buffer to be explicit and happen in reversed order rather than delegating to the intrinsic memcpy. On some architectures (x86_64) this can be a significant improvement; on others (arm64) it's negligible or worse.
The "auto" feature here enables this optimization when on platforms that seem to benefit from it,
the "prefer-no" prevents the "auto" feature from taking effect, and the regular feature enables the feature unconditionally. - prefer-no-self-copy-optimization self-copy-optimization
- auto-unroll-varint-encoding auto-optimize
-
Unroll varint encoding: This changes the spelling of the functions that encode varint values to branch in a way that bisects the resulting length of the varint and then calls an unrollable fixed-length encoding loop once the length is known, rather than implementing a plain loop that may branch on each iteration if the varint is done encoding.
This improves performance significantly in benchmarks on some CPUs but not on others, at the cost of emitted code size. The observed impact of this optimization is still rather conditional regardless: unless the data encoded involves long arrays of encoded varints, the advantages are likely to be far less prevalent.
As in other features, the "auto" feature enables the optimization when it seems like a good idea (currently always), the "prefer-no" feature prevents the "auto" feature from taking effect, and
the regular feature enables the optimization unconditionally. - prefer-no-unroll-varint-encoding unroll-varint-encoding
- full-test-suite = derive, detailed-errors, extended-diagnostics, third-party-type-support
- pprof
-
Enables pprof profiling in benchmarks.
Enables pprof
pprof prevents building on windows, so must be an optional feature