Commit c6e8ffa4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 41705722
#!/bin/sh -e
grumpc pystone.py >pystone.go && go run pystone.go
#!/bin/sh -e
export GRUMPY_PROFILE=cpu.out
grumpc pystone.py >pystone.go && go build pystone.go && ./pystone
...@@ -477,7 +477,7 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio ...@@ -477,7 +477,7 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
} }
µbenchtime = πTemp002 µbenchtime = πTemp002
µstones = πTemp004 µstones = πTemp004
// line 66: print "Pystone(%s) time for %d passes = %g" % \ // line 66: print "Pystone(%s) time for %d passes = %f" % \
πF.SetLineno(66) πF.SetLineno(66)
πTemp001 = make([]*πg.Object, 1) πTemp001 = make([]*πg.Object, 1)
if πTemp004, πE = πg.ResolveGlobal(πF, ß__version__); πE != nil { if πTemp004, πE = πg.ResolveGlobal(πF, ß__version__); πE != nil {
...@@ -490,20 +490,20 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio ...@@ -490,20 +490,20 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue continue
} }
πTemp003 = πg.NewTuple3(πTemp004, µloops, µbenchtime).ToObject() πTemp003 = πg.NewTuple3(πTemp004, µloops, µbenchtime).ToObject()
if πTemp002, πE = πg.Mod(πF, πg.NewStr("Pystone(%s) time for %d passes = %g").ToObject(), πTemp003); πE != nil { if πTemp002, πE = πg.Mod(πF, πg.NewStr("Pystone(%s) time for %d passes = %f").ToObject(), πTemp003); πE != nil {
continue continue
} }
πTemp001[0] = πTemp002 πTemp001[0] = πTemp002
if πE = πg.Print(πF, πTemp001, true); πE != nil { if πE = πg.Print(πF, πTemp001, true); πE != nil {
continue continue
} }
// line 68: print "This machine benchmarks at %g pystones/second" % stones // line 68: print "This machine benchmarks at %f pystones/second" % stones
πF.SetLineno(68) πF.SetLineno(68)
πTemp001 = make([]*πg.Object, 1) πTemp001 = make([]*πg.Object, 1)
if πE = πg.CheckLocal(πF, µstones, "stones"); πE != nil { if πE = πg.CheckLocal(πF, µstones, "stones"); πE != nil {
continue continue
} }
if πTemp002, πE = πg.Mod(πF, πg.NewStr("This machine benchmarks at %g pystones/second").ToObject(), µstones); πE != nil { if πTemp002, πE = πg.Mod(πF, πg.NewStr("This machine benchmarks at %f pystones/second").ToObject(), µstones); πE != nil {
continue continue
} }
πTemp001[0] = πTemp002 πTemp001[0] = πTemp002
......
...@@ -63,9 +63,9 @@ FALSE = 0 ...@@ -63,9 +63,9 @@ FALSE = 0
def main(loops=LOOPS): def main(loops=LOOPS):
benchtime, stones = pystones(loops) benchtime, stones = pystones(loops)
print "Pystone(%s) time for %d passes = %g" % \ print "Pystone(%s) time for %d passes = %f" % \
(__version__, loops, benchtime) (__version__, loops, benchtime)
print "This machine benchmarks at %g pystones/second" % stones print "This machine benchmarks at %f pystones/second" % stones
def pystones(loops=LOOPS): def pystones(loops=LOOPS):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment