Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 5b17cf2

Browse files
committed
Add ebobby/simple-raytracer as benchmark
cc rust-lang#684
1 parent f99b527 commit 5b17cf2

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

prepare.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@ git checkout -- .
1111
git checkout 341f207c1071f7290e3f228c710817c280c8dca1
1212
git apply ../crate_patches/regex.patch
1313
popd
14+
15+
git clone https://github.com/ebobby/simple-raytracer || echo "ebobby/simple-raytracer has already been cloned"
16+
pushd simple-raytracer
17+
git checkout -- .
18+
git checkout 804a7a21b9e673a482797aa289a18ed480e4d813
19+
20+
# build with cg_llvm for perf comparison
21+
cargo build
22+
mv target/debug/main raytracer_cg_llvm
23+
popd

test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ $RUSTC example/mod_bench.rs --crate-type bin
6161
#echo "[BUILD] sysroot in release mode"
6262
#./build_sysroot/build_sysroot.sh --release
6363

64+
pushd simple-raytracer
65+
echo "[BENCH] ebobby/simple-raytracer"
66+
cargo clean && ../cargo.sh build
67+
cp ./target/*/debug/main ./raytracer_cg_clif
68+
69+
hyperfine --runs ${RUN_RUNS:-10} ./raytracer_cg_llvm ./raytracer_cg_clif
70+
popd
71+
6472
pushd regex
6573
echo "[TEST] rust-lang/regex example shootout-regex-dna"
6674
../cargo.sh clean

0 commit comments

Comments
 (0)