for https://retoor.molodetz.nl/retoor/isspam
extract ../books.tar.gz
local machine benchmarks
single threaded: 33.63373279571533
rayon: 4.294418811798096
tokio: 4.717588901519775
tokio:
muncher: 2486ms
for_loops: 1227ms
for_loops_forbidden_only: 987ms
trie creation and stats accumulation take 0ms
compile options benchmarks
lto thin, fat doesn't change much
codegen-units 0, 1 doesn't change much
opt-level = "z" slow things down
ubuntu terminal running
https://snek.molodetz.nl/terminal.html ubuntu running thing instructions:
mkdir /project
cd /project
git clone https://retoor.molodetz.nl/retoor/isspam.git
apt install valgrind curl
export RUSTUP_HOME=/project/.rustup
export CARGO_HOME=/project/.cargo
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "/project/.cargo/env"
cd isspam
rustup install nightly
rustup default nightly
make
make benchmark
python3 bench.py
clone: git clone https://gitlab.com/jestdotty-group/draft/jisspam.git jest_rust
edit make: vi makefile and add build:
build_jest:
@echo "compiling jest_rust project"
cd jest_rust && cargo build --release && cp target/release/jisspam ..
append to all script:
all: build run valgrind build_risspam run_risspam build_cpp build_borded_cpp build_py build_jest
add to bench: vi bench.py
time_start = time.time()
subprocess.check_output('./jisspam books/*.txt', shell=True)
print("Time Jest Rust:", time.time() - time_start)
run: python3 bench.py
output looks something like this:
***benchmarking***
Time C: 31.315868377685547
Time Rust: 41.232205867767334
Time CPP: 20.1683189868927
Time Borded CPP: 15.468477964401245
Time Jest Rust: 54.74523115158081
Time Retoor Python: 287.63036131858826
***end benchmark***
add /jisspam to .gitignore to not commit the executable accidentally
| .. | ||
| src | ||
| .gitignore | ||
| Cargo.toml | ||
| README.md | ||