2015-11-20 22:51:58 +01:00
|
|
|
# Benchmarks
|
|
|
|
|
2019-07-23 19:14:28 +02:00
|
|
|
hello - output hello world to measure kernel calls
|
|
|
|
add - run integer adds by linear fibonacci of 20
|
|
|
|
call - exercise calling by recursive fibonacci of 10
|
|
|
|
noop - a baseline that does nothing
|
2015-11-20 22:51:58 +01:00
|
|
|
|
2019-07-25 20:25:15 +02:00
|
|
|
All programs (apart from noop) run 100k times to minimize startup impact.
|
2015-11-20 22:51:58 +01:00
|
|
|
|
2019-07-23 19:14:28 +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.
|
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-07-25 20:25:15 +02:00
|
|
|
always under one percent. Noop showed that program startup is a factor, so all programs loop
|
|
|
|
to 100k.
|
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.
|
|
|
|
But results (in ms) should be seen as relative, not absolute.
|
2015-11-21 16:04:20 +01:00
|
|
|
|
|
|
|
|
2019-07-23 19:14:28 +02:00
|
|
|
language | noop | hello | add | call
|
|
|
|
c | 45 | 100 | 72 | 591
|
|
|
|
go | 53 | 4060 | 64 | 624
|
2019-07-25 20:25:15 +02:00
|
|
|
rubyx | 42 | 1245 | ????? | ????
|
2015-11-24 14:33:16 +01:00
|
|
|
|
2019-07-23 19:14:28 +02:00
|
|
|
ruby | 1830 | 2750 | 3000 | 1900_000
|
2015-11-24 14:33:16 +01:00
|
|
|
|
2019-07-25 20:25:15 +02:00
|
|
|
Comparison with ruby, not really for speed, just to see how much leeway there is in the future.
|