mirror of
https://github.com/nineties/planckforth
synced 2025-01-14 08:01:27 +01:00
Update benchmark document
This commit is contained in:
parent
b601dc9a7b
commit
4d8e56bdbf
1 changed files with 14 additions and 1 deletions
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
TARGETS="i386-linux-handwritten c python"
|
TARGETS="i386-linux-handwritten c python"
|
||||||
TIMEFORMAT='%U'
|
TIMEFORMAT='%U'
|
||||||
|
CPU_MODEL=`cat /proc/cpuinfo | grep 'model name' | cut -d: -f2 | sed "s/^ *//g"`
|
||||||
|
MEM_SIZE="`cat /proc/meminfo | grep 'MemTotal' | awk '{ print $2/1024/1024 }'` GB"
|
||||||
|
UNAME=`uname -a`
|
||||||
|
|
||||||
function benchmark () {
|
function benchmark () {
|
||||||
sum=0
|
sum=0
|
||||||
for i in `seq $2`; do
|
for i in `seq $2`; do
|
||||||
|
@ -13,7 +17,7 @@ function benchmark () {
|
||||||
}
|
}
|
||||||
|
|
||||||
function generate-table {
|
function generate-table {
|
||||||
echo "# $1"
|
echo "## $1"
|
||||||
echo "\`$2\`"
|
echo "\`$2\`"
|
||||||
echo
|
echo
|
||||||
#echo "Average of $3 execution times."
|
#echo "Average of $3 execution times."
|
||||||
|
@ -29,5 +33,14 @@ function generate-table {
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "# Environment"
|
||||||
|
echo
|
||||||
|
echo "- $CPU_MODEL"
|
||||||
|
echo "- $MEM_SIZE"
|
||||||
|
echo "- $UNAME"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "# Benchmarks"
|
||||||
|
|
||||||
generate-table "Bootstrap Time" "./planck < bootstrap.fs benchmark/nop.fs" 1
|
generate-table "Bootstrap Time" "./planck < bootstrap.fs benchmark/nop.fs" 1
|
||||||
generate-table "Fib(30)" "./planck < bootstrap.fs benchmark/fib.fs" 1
|
generate-table "Fib(30)" "./planck < bootstrap.fs benchmark/fib.fs" 1
|
||||||
|
|
Loading…
Reference in a new issue