Last active
June 15, 2024 21:02
-
-
Save fwsGonzo/9132f0ef7d3f009baa5b222eedf392da to your computer and use it in GitHub Desktop.
Benchmark between libriscv and LuaJIT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./bench | |
* All benchmark results are measured in 200x1200 samples | |
benchmark overhead median 0ns lowest: 0ns highest: 0ns | |
Self-test running ELF entry at 0x1021C | |
Calling into event loop...! | |
event_loop: Checking for work | |
event_loop: Going to sleep! | |
add_work: Adding work | |
Resuming event loop...! | |
event_loop: Checking for work | |
work: Doing some work! | |
event_loop: Going to sleep! | |
event_loop: Checking for work | |
event_loop: Going to sleep! | |
add_work: Adding work | |
event_loop: Checking for work | |
work: Doing some work! | |
event_loop: Going to sleep! | |
RISC-V self-test OK | |
libriscv: mips instr 1600025000, time 0.078446, 20396.605283 mip/s | |
libriscv: call overhead median 3ns lowest: 3ns highest: 3ns | |
libriscv: preempt overhead median 12ns lowest: 11ns highest: 15ns | |
libriscv: fork median 221ns lowest: 215ns highest: 353ns | |
libriscv: resume execution median 4ns lowest: 4ns highest: 9ns | |
luajit: call overhead median 126ns lowest: 126ns highest: 195ns | |
After this point, call overhead is subtracted from every benchmark result for both libriscv and Lua | |
libriscv: array append median 3ns lowest: 3ns highest: 5ns | |
libriscv: vector append median 1ns lowest: 1ns highest: 4ns | |
luajit: table append median 33ns lowest: 24ns highest: 157ns | |
libriscv: 8x arguments median 18ns lowest: 18ns highest: 51ns | |
libriscv: 8x stored args median 14ns lowest: 13ns highest: 15ns | |
libriscv: 8x prepared args median 18ns lowest: 18ns highest: 26ns | |
luajit: 8x arguments median 319ns lowest: 315ns highest: 434ns | |
libriscv: integer math median 1ns lowest: 1ns highest: 4ns | |
libriscv: fp math median 4ns lowest: 4ns highest: 10ns | |
libriscv: exp math median 11ns lowest: 11ns highest: 14ns | |
libriscv: fib(40) median 10ns lowest: 10ns highest: 13ns | |
libriscv: taylor(1K) median 632ns lowest: 599ns highest: 758ns | |
luajit: integer math median 45ns lowest: 38ns highest: 102ns | |
luajit: fp math median 55ns lowest: 51ns highest: 99ns | |
luajit: exp math median 60ns lowest: 58ns highest: 169ns | |
luajit: fib(40) median 56ns lowest: 53ns highest: 118ns | |
luajit: taylor(1K) median 896ns lowest: 837ns highest: 981ns | |
libriscv: syscall overhead median 2ns lowest: 2ns highest: 4ns | |
libriscv: syscall string median 4ns lowest: 3ns highest: 7ns | |
luajit: syscall overhead median 14ns lowest: 13ns highest: 48ns | |
luajit: syscall string median 29ns lowest: 28ns highest: 86ns | |
libriscv: complex syscall median 30ns lowest: 30ns highest: 76ns | |
luajit: complex syscall median 737ns lowest: 725ns highest: 803ns | |
libriscv: micro threads median 128ns lowest: 125ns highest: 195ns | |
luajit: coroutines median 165ns lowest: 161ns highest: 245ns | |
libriscv: micro thread args median 156ns lowest: 152ns highest: 212ns | |
libriscv: full thread args median 168ns lowest: 163ns highest: 217ns | |
luajit: coroutine args median 216ns lowest: 212ns highest: 268ns | |
luajit: coroutine args median 237ns lowest: 234ns highest: 293ns | |
libriscv: naive memcpy median 60ns lowest: 60ns highest: 98ns | |
libriscv: syscall memcpy median 18ns lowest: 17ns highest: 28ns | |
luajit: memcpy median 97ns lowest: 89ns highest: 192ns | |
libriscv: syscall memset median 8ns lowest: 8ns highest: 12ns | |
libriscv: naive memset median 34ns lowest: 34ns highest: 63ns | |
luajit: memset median 69ns lowest: 68ns highest: 182ns | |
libriscv: sieve(10M) median 32ms lowest: 32ms highest: 32ms | |
luajit: sieve(10M) median 125ms lowest: 125ms highest: 125ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
libriscv with TCC (as a form of JIT) against LuaJIT