Don't benchmark mod_bench anymore
This commit is contained in:
parent
552991e17e
commit
2cd8ccbea1
@ -20,7 +20,7 @@ unsafe extern "C" fn _Unwind_Resume() {
|
||||
|
||||
#[start]
|
||||
fn main(_argc: isize, _argv: *const *const u8) -> isize {
|
||||
for i in 2..100_000_000 {
|
||||
for i in 2..10_000_000 {
|
||||
black_box((i + 1) % i);
|
||||
}
|
||||
|
||||
|
19
test.sh
19
test.sh
@ -73,8 +73,9 @@ echo "[AOT] track-caller-attribute"
|
||||
$RUSTC example/track-caller-attribute.rs --crate-type bin -Cpanic=abort --target $TARGET_TRIPLE
|
||||
$RUN_WRAPPER ./target/out/track-caller-attribute
|
||||
|
||||
echo "[BUILD] mod_bench"
|
||||
echo "[AOT] mod_bench"
|
||||
$RUSTC example/mod_bench.rs --crate-type bin --target $TARGET_TRIPLE
|
||||
$RUN_WRAPPER ./target/out/mod_bench
|
||||
|
||||
pushd rand
|
||||
rm -r ./target || true
|
||||
@ -116,19 +117,3 @@ diff -u res.txt examples/regexdna-output.txt
|
||||
echo "[TEST] rust-lang/regex tests"
|
||||
../cargo.sh test --tests -- --exclude-should-panic --test-threads 1 -Zunstable-options
|
||||
popd
|
||||
|
||||
echo
|
||||
echo "[BENCH COMPILE] mod_bench"
|
||||
|
||||
COMPILE_MOD_BENCH_INLINE="$RUSTC example/mod_bench.rs --crate-type bin -Zmir-opt-level=3 -O --crate-name mod_bench_inline"
|
||||
COMPILE_MOD_BENCH_LLVM_0="rustc example/mod_bench.rs --crate-type bin -Copt-level=0 -o target/out/mod_bench_llvm_0 -Cpanic=abort"
|
||||
COMPILE_MOD_BENCH_LLVM_1="rustc example/mod_bench.rs --crate-type bin -Copt-level=1 -o target/out/mod_bench_llvm_1 -Cpanic=abort"
|
||||
COMPILE_MOD_BENCH_LLVM_2="rustc example/mod_bench.rs --crate-type bin -Copt-level=2 -o target/out/mod_bench_llvm_2 -Cpanic=abort"
|
||||
COMPILE_MOD_BENCH_LLVM_3="rustc example/mod_bench.rs --crate-type bin -Copt-level=3 -o target/out/mod_bench_llvm_3 -Cpanic=abort"
|
||||
|
||||
# Use 100 runs, because a single compilations doesn't take more than ~150ms, so it isn't very slow
|
||||
hyperfine --runs ${COMPILE_RUNS:-100} "$COMPILE_MOD_BENCH_INLINE" "$COMPILE_MOD_BENCH_LLVM_0" "$COMPILE_MOD_BENCH_LLVM_1" "$COMPILE_MOD_BENCH_LLVM_2" "$COMPILE_MOD_BENCH_LLVM_3"
|
||||
|
||||
echo
|
||||
echo "[BENCH RUN] mod_bench"
|
||||
hyperfine --runs ${RUN_RUNS:-10} ./target/out/mod_bench{,_inline} ./target/out/mod_bench_llvm_*
|
||||
|
Loading…
Reference in New Issue
Block a user