2019-08-24 10:44:13 +02:00
|
|
|
# Benchmarks
|
2015-11-20 22:51:58 +01:00
|
|
|
|
2019-07-23 19:14:28 +02:00
|
|
|
hello - output hello world to measure kernel calls
|
2019-07-31 20:18:03 +02:00
|
|
|
add - run integer adds by linear fibonacci of 40
|
2019-07-30 20:16:24 +02:00
|
|
|
call - exercise calling by recursive fibonacci of 20
|
2019-07-23 19:14:28 +02:00
|
|
|
noop - a baseline that does nothing
|
2019-07-31 20:18:03 +02:00
|
|
|
loop - just counts down, from 1M
|
2015-11-20 22:51:58 +01:00
|
|
|
|
2019-07-31 20:18:03 +02:00
|
|
|
Loop, Hello, add and call run 1M , 50k, 10k and 100 respectively,
|
|
|
|
to minimize startup impact.
|
2015-11-20 22:51:58 +01:00
|
|
|
|
2019-07-30 12:55:29 +02:00
|
|
|
C was linked statically as dynamic linked influences times.
|
|
|
|
Output was sent to /dev/null, so as to measure the calling and not the terminal.
|
|
|
|
Also output was unbuffered, because that is what rubyx implements.
|
|
|
|
|
2015-11-20 22:51:58 +01:00
|
|
|
# Results
|
|
|
|
|
|
|
|
Results were measured by a ruby script. Mean and variance was measured until variance was low,
|
2019-08-01 08:20:08 +02:00
|
|
|
always under one percent. Noop showed that program startup is a factor, so all programs loop somewhere from 1M to 100, depending on how intensive.
|
2015-11-20 22:51:58 +01:00
|
|
|
|
2019-07-23 19:14:28 +02:00
|
|
|
The machine was a virtual arm (qemu) run on a acer swift 5 (i5 8265 3.9GHz), performance roughly equivalent to a raspberry pi.
|
2019-07-30 12:55:29 +02:00
|
|
|
Results (in ms) should be seen as relative, not absolute.
|
2015-11-24 14:33:16 +01:00
|
|
|
|
|
|
|
|
2019-07-31 20:18:03 +02:00
|
|
|
language | noop | hello | add | call | loop
|
2019-08-24 15:03:35 +02:00
|
|
|
c | 55 | 330 | 88 | 135 | 6
|
|
|
|
go | 52 | 400 | 9 | 77 | 2
|
|
|
|
rubyx | 42 | 160 | 1575 | 780 | 430
|
2019-07-31 20:18:03 +02:00
|
|
|
ruby | 1570 | 650 | 1090 | 1500 | 180
|
2019-08-24 15:03:35 +02:00
|
|
|
mruby | 86 | 1100 | 1370 | 2700 | 300
|