File tree Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ unsafe extern "C" fn _Unwind_Resume() {
20
20
21
21
#[ start]
22
22
fn main ( _argc : isize , _argv : * const * const u8 ) -> isize {
23
- for i in 2 ..100_000_000 {
23
+ for i in 2 ..10_000_000 {
24
24
black_box ( ( i + 1 ) % i) ;
25
25
}
26
26
Original file line number Diff line number Diff line change @@ -73,8 +73,9 @@ echo "[AOT] track-caller-attribute"
73
73
$RUSTC example/track-caller-attribute.rs --crate-type bin -Cpanic=abort --target $TARGET_TRIPLE
74
74
$RUN_WRAPPER ./target/out/track-caller-attribute
75
75
76
- echo " [BUILD ] mod_bench"
76
+ echo " [AOT ] mod_bench"
77
77
$RUSTC example/mod_bench.rs --crate-type bin --target $TARGET_TRIPLE
78
+ $RUN_WRAPPER ./target/out/mod_bench
78
79
79
80
pushd rand
80
81
rm -r ./target || true
@@ -116,19 +117,3 @@ diff -u res.txt examples/regexdna-output.txt
116
117
echo " [TEST] rust-lang/regex tests"
117
118
../cargo.sh test --tests -- --exclude-should-panic --test-threads 1 -Zunstable-options
118
119
popd
119
-
120
- echo
121
- echo " [BENCH COMPILE] mod_bench"
122
-
123
- COMPILE_MOD_BENCH_INLINE=" $RUSTC example/mod_bench.rs --crate-type bin -Zmir-opt-level=3 -O --crate-name mod_bench_inline"
124
- 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"
125
- 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"
126
- 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"
127
- 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"
128
-
129
- # Use 100 runs, because a single compilations doesn't take more than ~150ms, so it isn't very slow
130
- 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 "
131
-
132
- echo
133
- echo " [BENCH RUN] mod_bench"
134
- hyperfine --runs ${RUN_RUNS:- 10} ./target/out/mod_bench{,_inline} ./target/out/mod_bench_llvm_*
You can’t perform that action at this time.
0 commit comments