forked from clojure/clojurescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
benchmark
executable file
·48 lines (40 loc) · 1.49 KB
/
benchmark
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
rm -rf builds/out-adv-bench
mkdir -p builds/out-adv-bench
bin/cljsc benchmark "{:optimizations :advanced :output-wrapper true :compiler-stats true :verbose true :output-dir \"builds/out-adv-bench\"}" > builds/out-adv-bench/core-advanced-benchmark.js
if [ "$V8_HOME" = "" ]; then
echo "V8_HOME not set, skipping V8 benchmarks"
else
echo "Benchmarking with V8"
"${V8_HOME}/d8" builds/out-adv-bench/core-advanced-benchmark.js
fi
if [ "$SPIDERMONKEY_HOME" = "" ]; then
echo "SPIDERMONKEY_HOME not set, skipping SpiderMonkey benchmarks"
else
echo "Benchmarking with SpiderMonkey"
"${SPIDERMONKEY_HOME}/js" -f builds/out-adv-bench/core-advanced-benchmark.js
fi
if ! hash jsc 2>/dev/null; then
echo "jsc not on path, skipping JavaScriptCore benchmarks"
else
echo "Benchmarking with JavaScriptCore"
jsc -f builds/out-adv-bench/core-advanced-benchmark.js
fi
if [ "$NASHORN_HOME" = "" ]; then
echo "NASHORN_HOME not set, skipping Nashorn benchmarks"
else
echo "Benchmarking with Nashorn"
"${NASHORN_HOME}/jjs" builds/out-adv-bench/core-advanced-benchmark.js
fi
if [ "$CHAKRACORE_HOME" = "" ]; then
echo "CHAKRACORE_HOME not set, skipping ChakraCore benchmarks"
else
echo "Benchmarking with ChakraCore"
"${CHAKRACORE_HOME}/ch" builds/out-adv-bench/core-advanced-benchmark.js
fi
if [ "$GRAALVM_HOME" = "" ]; then
echo "GRAALVM_HOME not set, skipping GraalVM benchmarks"
else
echo "Benchmarking with GraalVM"
"${GRAALVM_HOME}/js" builds/out-adv-bench/core-advanced-benchmark.js
fi