This folder includes benchmarks of WARDuino.
The various benchmark tests are listed in the tasks folder. In there, each task has a folder and three subfolders:
espruino
containing aimpl.js
that can be sent over to Espruinowast
containing aimpl.c
implementation of the task that will be compiled to WebAssembly by the makefilec
containing aarduino.ino
implementation of the task generated automaticly from thewast
dirctory
To run the benchmarks localy on your computer, without board, execute one of the following in this folder.
The benchmark program will also check the return values of all the functions in this mode and keep track of the total.
Edit the main
of benchmarks.cpp to add and/or remove tasks or modify their expected return values.
- No tracing no debugging
make clean all run
- No tracing only
make clean all run TRACE=1
- No debug output only
make clean all run DEBUG=1
- No trace and debug output
make clean all run TRACE=1 DEBUG=1
- All the output
make clean all run TRACE=1 DEBUG=1 WARN=1 INFO=1
The clean
can be removed if the debugginf flags are not changed
Currently, the benchmarks only work for the esp32
.
Place a list of benchmarks you which to execute in bench.list
then run:
- For WARDuino:
./warduino_bench.sh {OUTPUTFILE}
(this will flash an ino file on the board that runs the WebAssembly bytecode with WARDuino generated from theC
implementation withclang
)- Add the env variable
BOARD=ESP8266
for that board
- Add the env variable
- For Espruino:
./espruino_bench.sh {OUTPUTFILE}
(this will flash the board with Espruino and execute all the tasks) - For Wasm3:
./wasm3_bench.sh {OUTPUTFILE}
(this will flash an ino file on the board that runs the WebAssembly bytecode with Wasm3 generated from theC
implementation withclang
) - For native:
./native_bench.sh {OUTPUTFILE}
(this will flash the board with each of the C files and time execution) - Or
./all_bench.sh {out_file}
to do then all