Compilation options can be configured via RUSTFLAGS or by
enabling/disabling project-specific features.
In your project's Cargo.toml:
[dependencies.hexe] # or hexe_core
version = "0.0.5"
features = ["simd"]Enables SIMD-accelerated operations (nightly). See issue #4 for more information.
Once SIMD is stable (#48556),
this feature will be made a default. By opting out, Hexe can still compile using
previous rustc versions without SIMD support.
Hexe may improve in performance if rustc is told to use features specific to
the compilation target.
RUSTFLAGS="-C target-feature +$FEATURE"Some features that may be worth using:
-
popcnt(x86,x86_64):Enables the hardware population count instruction instead of the slower software algorithm. This improves the performance of methods such as
Bitboard::lenandMultiBoard::len.
Another way of improving performance is by setting target-cpu:
RUSTFLAGS="-C target-cpu=native"This will enable all target-features available for the CPU family.