mirror of
https://github.com/vacp2p/status-rln-prover.git
synced 2026-01-06 20:23:50 -05:00
Use all best practice to squeeze a few more TPS out of Prover (#38)
This commit is contained in:
@@ -42,3 +42,12 @@ tonic-prost-build = "0.14.1"
|
||||
|
||||
#[dev.dependencies]
|
||||
criterion = { version = "0.7.0", features = ["async_tokio"] }
|
||||
|
||||
[profile.release]
|
||||
lto = "fat"
|
||||
codegen-units = 1
|
||||
opt-level = 3
|
||||
debug = false
|
||||
panic = "abort"
|
||||
strip = true
|
||||
incremental = false
|
||||
|
||||
15
Makefile
Normal file
15
Makefile
Normal file
@@ -0,0 +1,15 @@
|
||||
NATIVE_FLAGS = -C target-cpu=native
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
cargo build --release $(ARGS)
|
||||
|
||||
RAYON_NUM_THREADS ?= 64
|
||||
PROOF_SERVICE_COUNT ?= 64
|
||||
PROOF_COUNT ?= 64
|
||||
|
||||
.PHONY: bench
|
||||
bench:
|
||||
RAYON_NUM_THREADS=$(RAYON_NUM_THREADS) PROOF_SERVICE_COUNT=$(PROOF_SERVICE_COUNT) PROOF_COUNT=$(PROOF_COUNT) RUSTFLAGS="$(NATIVE_FLAGS)" cargo bench $(ARGS)
|
||||
|
||||
# Example: make bench RAYON_NUM_THREADS=128 PROOF_SERVICE_COUNT=32 PROOF_COUNT=8 ARGS="--bench prover_bench"
|
||||
@@ -24,7 +24,3 @@ opentelemetry-otlp = { version = "0.30.0", features = [
|
||||
"tls-roots",
|
||||
] }
|
||||
tracing-opentelemetry = "0.31.0"
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1 # Do not split into multiple codegen units, improve performance, may compile slower
|
||||
lto = "fat" # Enables Link Time Optimization, enabling more aggressive optimizations across the entire codebase
|
||||
Reference in New Issue
Block a user