/[libvob]/libvob/bench/mark.py
ViewVC logotype

Diff of /libvob/bench/mark.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by tjl, Sat Aug 16 09:04:54 2003 UTC revision 1.12 by tjl, Fri Oct 31 07:22:08 2003 UTC
# Line 74  def runVSBench(sceneFunc, args): Line 74  def runVSBench(sceneFunc, args):
74          vs = win.createVobScene()          vs = win.createVobScene()
75          sx = vs.size.width          sx = vs.size.width
76    
77        outfile = open("benchdata","w")
78    
79      for ar in _argLists(args):      for ar in _argLists(args):
80          vs = win.createVobScene()          vs = win.createVobScene()
# Line 88  def runVSBench(sceneFunc, args): Line 89  def runVSBench(sceneFunc, args):
89              # print "Now: ",iters,total,ms              # print "Now: ",iters,total,ms
90          print ou          print ou
91          print ms, "ms   with ",iters," in ",total          print ms, "ms   with ",iters," in ",total
92            outfile.write("%s %s\n" % (ou, ms))
93          print 1000.0 / ms,"per second\n"          print 1000.0 / ms,"per second\n"
94    
95        outfile.close()
96    
97  def runPureBench(func, args):  def runPureBench(func, args):
98      for ar in _argLists(args):      for ar in _argLists(args):
99          # Precompile for JIT          # Precompile for JIT
# Line 99  def runPureBench(func, args): Line 103  def runPureBench(func, args):
103    
104          total = 0          total = 0
105          iters = 1          iters = 1
106          while total < 2.0:          while total < 3.0:
107              iters *= 2              iters *= 2
108              (total, str) = func(iters, **ar)              (total, str) = func(iters, **ar)
109              ms = total * 1. / iters * 1000              ms = total * 1. / iters * 1000

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26