Skip to content

Commit e03d030

Browse files
committed
chore: remove "runtime" mode
not much point come to think of it -- portable should include any runtime optimizations.
1 parent ad84da9 commit e03d030

4 files changed

Lines changed: 2 additions & 11 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ _all_compatible = ["cpp_portable", "rust"]
3131
cpp_portable = ["cpp"]
3232
# Optimize FastPFOR for the current CPU.
3333
cpp_native = ["cpp"]
34-
# Experimental mode for dynamic dispatch of FastPFOR implementations.
35-
cpp_runtime = ["cpp"]
3634
cpp = ["dep:cmake", "dep:cxx", "dep:cxx-build"]
3735
rust = ["dep:thiserror", "dep:bytes"]
3836

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ The C++ backend can be compiled with different SIMD instruction sets. Control th
5858
|------|-------------|
5959
| `cpp_portable` | **Default.** Uses SSE4.2 baseline only. Binaries run on any x86-64 CPU from ~2008+. Best for distributable libraries. |
6060
| `cpp_native` | Uses `-march=native` to enable all SIMD instructions supported by the build machine (AVX, AVX2, etc.). Maximum performance but may crash on CPUs lacking those instructions. |
61-
| `cpp_runtime` | Experimental. Reserved for future runtime CPU dispatch. |
6261

63-
Feature selection can be overridden with the `FASTPFOR_SIMD_MODE` environment variable set to "portable", "native", or "runtime".
62+
Feature selection can be overridden with the `FASTPFOR_SIMD_MODE` environment variable set to "portable" or "native".
6463

6564
**Recommendation:** Use `portable` (default) for libraries and distributed binaries. Use `native` only when building for a specific machine where you need maximum performance.
6665

build.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ fn build_fastpfor() {
1717
// Warn if more than one feature is enabled. The order is important, must match the if else block below.
1818
let simd_features = [
1919
(cfg!(feature = "cpp_portable"), "'cpp_portable'"),
20-
(cfg!(feature = "cpp_runtime"), "'cpp_runtime'"),
2120
(cfg!(feature = "cpp_native"), "'cpp_native'"),
2221
];
2322
let enabled_simd_features: Vec<_> = simd_features
@@ -28,7 +27,6 @@ fn build_fastpfor() {
2827
// SIMD mode configuration via environment variable:
2928
// - native: Use -march=native for maximum performance (not portable across CPUs)
3029
// - portable: Use baseline SSE4.2 only for maximum compatibility (default)
31-
// - runtime: Use function multi-versioning for runtime CPU dispatch (experimental)
3230
let simd_mode = env::var("FASTPFOR_SIMD_MODE");
3331
if enabled_simd_features.len() > 1 {
3432
let feats = enabled_simd_features.join(", ");
@@ -49,8 +47,6 @@ fn build_fastpfor() {
4947
// The order is important, must match the list above.
5048
if cfg!(feature = "cpp_portable") {
5149
"portable"
52-
} else if cfg!(feature = "cpp_runtime") {
53-
"runtime"
5450
} else if cfg!(feature = "cpp_native") {
5551
"native"
5652
} else {

justfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ test:
116116
cargo test --workspace --all-targets --features _all_compatible
117117
cargo test --workspace --doc --features _all_compatible
118118

119-
# Test with a specific SIMD mode (portable, native, or runtime)
119+
# Test with a specific SIMD mode (portable, native)
120120
test-simd mode='portable':
121121
cargo test --workspace --all-targets --features cpp_{{mode}}
122122

@@ -126,8 +126,6 @@ test-all-simd-modes:
126126
{{just}} test-simd portable
127127
cargo clean -p fastpfor
128128
{{just}} test-simd native
129-
cargo clean -p fastpfor
130-
{{just}} test-simd runtime
131129

132130
# Test documentation generation
133131
test-doc: (docs '')

0 commit comments

Comments
 (0)