Skip to content

Commit c21a2a6

Browse files
committed
build: Update Cargo.toml to exclude Python files and add benchmark profile settings
1 parent 48da7a8 commit c21a2a6

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ keywords = [
1515
"integer-encoding",
1616
]
1717
categories = ["data-structures", "compression", "algorithms"]
18-
exclude = [".github/*", "images/*"]
18+
exclude = [".github/*", "images/*", "python/*"]
1919

2020
[dependencies]
2121
atomic = "0.5.3"
@@ -39,6 +39,8 @@ sux = "0.8.0"
3939
succinct = "0.5.2"
4040
rand = "0.9.0"
4141

42+
# --- Benchmark Targets ---
43+
4244
[[bench]]
4345
name = "bench_random_access"
4446
harness = false
@@ -89,8 +91,36 @@ name = "bench_var_parallel"
8991
harness = false
9092
path = "benches/variable/bench_parallel.rs"
9193

94+
[[bench]]
95+
name = "bench_size"
96+
harness = false
97+
path = "benches/bench_size.rs"
98+
9299

93100
[features]
94101
default = ["parallel"]
95102
parallel = ["rayon"]
96103
serde = ["dep:serde"]
104+
105+
106+
# --- Build Profiles ---
107+
108+
[profile.release]
109+
# Standard release optimizations.
110+
opt-level = 3
111+
# Include debug information in release builds.
112+
# The impact on runtime performance is negligible, but the binary size increases.
113+
debug = true
114+
overflow-checks = false
115+
116+
[profile.bench]
117+
# Aggressive optimizations for benchmarks, at the cost of
118+
# much longer compile times
119+
opt-level = 3
120+
# Enable "fat" Link-Time Optimization to allow optimizations across the entire crate.
121+
lto = "fat"
122+
# Disable debug info for benchmark binaries to get the cleanest performance measurement.
123+
debug = false
124+
# Force the compiler to process the crate as a single unit, enabling more
125+
# aggressive inlining and optimization.
126+
codegen-units = 1

0 commit comments

Comments
 (0)