{
local title=$1
shift
- if test -n "$fast"; then
+ if test "$fast" = truetrue; then
+ run_command "$@" ../examples/hello_world.nit -o "hello.$title.bin"
+ bench_command "hello" "hello_world" "./hello.$title.bin"
+ elif test -n "$fast"; then
run_command "$@" ../src/nitc.nit -o "nitc.$title.bin"
bench_command "nitc-g" "nitc --global ../src/test_parser.nit" "./nitc.$title.bin" -v --global --no-cc ../src/test_parser.nit
run_command "$@" ../src/nit.nit -o "nit.$title.bin"
bench_command "nitc-g" "nitc --global --no-cc ../src/nitls.nit" "./nitc.$title.bin" -v --global --no-cc ../src/nitls.nit
bench_command "nitc-s" "nitc --separate ../src/nitc.nit" "./nitc.$title.bin" -v --no-cc --separate ../src/nitc.nit
run_command "$@" ../src/nit.nit -o "nit.$title.bin"
- bench_command "nit" "nit ../src/test_parser.nit ../src/nitls.nit" "./nit.$title.bin" -v ../src/test_parser.nit -- -n ../src/nitls.nit
+ bench_command "nit-queens" "nit queens.nit 8" "./nit.$title.bin" ../lib/ai/examples/queens.nit -q 8
+ bench_command "nit-nitcc" "nit nitcc.nit calc.sablecc" "./nit.$title.bin" ../contrib/nitcc/src/nitcc.nit ../contrib/nitcc/examples/calc.sablecc
run_command "$@" ../src/nitdoc.nit -o "nitdoc.$title.bin"
rm -r out 2> /dev/null
mkdir out 2> /dev/null
bench_command "nitmd" "markdown" "./nitmd.$title.bin" markdown/benches/out/mixed.md 80
fi
- rm -r *.bin .nit_compile out
+ rm -r *.bin .nit_compile out 2> /dev/null
}
## HANDLE OPTIONS ##
-h) usage; exit;;
-n) count="$2"; shift; shift;;
--dry) dry_run=true; shift;;
- --fast) fast=true; shift;;
+ --fast) fast=true$fast; shift;;
--html) html="index.html"; echo >"$html" "<html><head></head><body>"; shift;;
*) stop=true
esac
if test -z "$fast"; then
make -C markdown/benches
+ make -C ../contrib/nitcc
fi
## EFFECTIVE BENCHS ##
plot "$name.gnu"
}
-bench_nitc-s_options "slower" --hardening --no-shortcut-equal --no-union-attribute --no-shortcut-range --no-inline-intern "--no-gcc-directive likely --no-gcc-directive noreturn"
+bench_nitc-s_options "slower" --hardening --no-shortcut-equal --no-union-attribute --no-shortcut-range --no-inline-intern "--no-gcc-directive likely --no-gcc-directive noreturn" "--no-tag-primitives"
bench_nitc-s_options "nocheck" --no-check-null --no-check-autocast --no-check-attr-isset --no-check-covariance --no-check-assert
bench_nitc-s_options "faster" --skip-dead-methods --inline-coloring-numbers --inline-some-methods --direct-call-monomorph "--inline-some-methods --direct-call-monomorph" ""
run_compiler "nitc-sct" ./nitc --separate --colors-are-symbols --trampoline-call
prepare_res "$name-nitc-sl.dat" "nitc-sl" "nitc with --separate --link-boost"
run_compiler "nitc-scts" ./nitc --separate --link-boost
- prepare_res "$name-nitc-sg.dat" "nitc-sg" "nitc with --separate --semi-global"
- run_compiler "nitc-sg" ./nitc --separate --semi-global
+ prepare_res "$name-nitc-scgc.dat" "nitc-scgc" "nitc with --separate --colors-are-symbols --guard-call"
+ run_compiler "nitc-scgc" ./nitc --separate --colors-are-symbols --guard-call
+ prepare_res "$name-nitc-scd.dat" "nitc-scd" "nitc with --separate --colors-are-symbols --direct-call-monomorph0"
+ run_compiler "nitc-scd" ./nitc --separate --colors-are-symbols --direct-call-monomorph0
plot "$name.gnu"
}
bench_linkboost
+function bench_call_monomorph()
+{
+ name="$FUNCNAME"
+ skip_test "$name" && return
+ prepare_res "$name-nitc.dat" "nitc" "nitc with --separate"
+ run_compiler "nitc" ./nitc
+ prepare_res "$name-nitc-d0.dat" "nitc-d0" "nitc with --separate --direct-call-monomorph0"
+ run_compiler "nitc-d0" ./nitc --direct-call-monomorph0
+ prepare_res "$name-nitc-d1.dat" "nitc-d" "nitc with --separate --direct-call-monomorph"
+ run_compiler "nitc-d1" ./nitc --direct-call-monomorph
+ prepare_res "$name-nitc-d2.dat" "nitc-d2" "nitc with --separate --direct-call-monomorph2"
+ run_compiler "nitc-d2" ./nitc --direct-call-monomorph --direct-call-monomorph0
+ plot "$name.gnu"
+}
+bench_call_monomorph
+
if test -n "$html"; then
echo >>"$html" "</body></html>"
fi