[pypy-commit] extradoc extradoc: add sqrt to lua run

hakanardo noreply at buildbot.pypy.org
Tue Aug 14 20:24:30 CEST 2012


Author: Hakan Ardo <hakan at debian.org>
Branch: extradoc
Changeset: r4574:984945224b6b
Date: 2012-08-14 20:23 +0200
http://bitbucket.org/pypy/extradoc/changeset/984945224b6b/

Log:	add sqrt to lua run

diff --git a/talk/iwtc11/benchmarks/benchmark.sh b/talk/iwtc11/benchmarks/benchmark.sh
--- a/talk/iwtc11/benchmarks/benchmark.sh
+++ b/talk/iwtc11/benchmarks/benchmark.sh
@@ -25,6 +25,9 @@
     ./runner.py -n 5 -c "$*" scimark/run_LU.c 1000 2
     rm a.out
 elif [[ "$1" == luajit* ]]; then
+    $* runner.lua sqrt int
+    $* runner.lua sqrt float
+    $* runner.lua sqrt Fix16
     $* runner.lua SOR 100 32768
     $* runner.lua SOR 1000 256
     $* runner.lua SparseMatMult 1000 5000 262144
diff --git a/talk/iwtc11/benchmarks/runner.lua b/talk/iwtc11/benchmarks/runner.lua
--- a/talk/iwtc11/benchmarks/runner.lua
+++ b/talk/iwtc11/benchmarks/runner.lua
@@ -34,6 +34,12 @@
     return string.format('FFT(%d, %d)', n, cycles)
 end
 
+package.path = package.path .. ";sqrt/?.lua"
+require('sqrt')
+function benchmarks.sqrt(a)
+    return string.format('sqrt(%s)', sqrt.main({a}))
+end
+
 
 
 function measure(name, ...)
diff --git a/talk/iwtc11/benchmarks/sqrt/sqrt.lua b/talk/iwtc11/benchmarks/sqrt/sqrt.lua
--- a/talk/iwtc11/benchmarks/sqrt/sqrt.lua
+++ b/talk/iwtc11/benchmarks/sqrt/sqrt.lua
@@ -1,3 +1,5 @@
+module(..., package.seeall);
+
 local bit = require("bit")
 local lshift, rshift, tobit = bit.lshift, bit.rshift, bit.tobit
 
@@ -103,4 +105,4 @@
     return string.format("%s", arg)
 end
 
-main(arg)
+--main(arg)


More information about the pypy-commit mailing list