You can see the benchmarks in action here.
All derivative work is the copyright of their respective authors and distributed under their original license. All original work unless otherwise stated is distributed under the same license as Scala.js.
To run the benchmarks, first install the Scala.js compiler by following the instructions in the Scala.js README.
sbt either in the root folder or in the folder of the benchmark
you want to run. Issue
For benchmarks with a web version, open the
index-dev.html of the in your
favorite Web browser. For benchmarks without a web version execute the
run.sh script inside the benchmark folder.
During development, it is useful to use
~packageJS in sbt, so that each
time you save a source file, a compilation of the project is triggered.
Hence only a refresh of your Web page is needed to see the effects of your
The optimized version
Instead of running
packageJS, you can also run
optimizeJS to generate
index.html refers to the
All the code generated by Scala.js respects these assumptions. But if you
exports.js, make sure that you comply with them if you want to be
able to use
I have unresolved dependencies on
You have probably forgotten to execute
publishLocal from the sbt prompt in
WARNING - dangerous use of the global this object
This warning is emitted by the Google Closure Compiler when running
optimizeJS. The global
this object is used in the
script as an alternative to
window to export symbols used by the
various startup code. This allows the benchmarks to run both in the web
browser and in the
d8 (the V8 shell), which does not define global