[Python-checkins] python/nondist/sandbox/parrotbench b3.py, 1.1, 1.2 out3, 1.1, 1.2

gvanrossum at users.sourceforge.net gvanrossum at users.sourceforge.net
Tue Dec 30 19:12:14 EST 2003


Update of /cvsroot/python/python/nondist/sandbox/parrotbench
In directory sc8-pr-cvs1:/tmp/cvs-serv29787

Modified Files:
	b3.py out3 
Log Message:
Oops, disable timings.

Index: b3.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/parrotbench/b3.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** b3.py	31 Dec 2003 00:10:34 -0000	1.1
--- b3.py	31 Dec 2003 00:12:12 -0000	1.2
***************
*** 45,49 ****
  K = 1
  
! if __debug__: import time
  
  def sortum(data, cmp=None):
--- 45,49 ----
  K = 1
  
! ##if __debug__: import time
  
  def sortum(data, cmp=None):
***************
*** 51,55 ****
      compares = 0
      data = data[:]
!     if __debug__: t0 = time.time()
      if cmp is None:
          print "using None"
--- 51,55 ----
      compares = 0
      data = data[:]
!     ##if __debug__: t0 = time.time()
      if cmp is None:
          print "using None"
***************
*** 58,72 ****
          print "using", cmp.__name__
          data.sort(cmp)
!     if __debug__: t1 = time.time()
      print "Z", data[:K], data[N//2:N//2+K], data[-K:]
      print compares,
!     if __debug__:  print "%.3f" % (t1-t0),
      print
  
  def main():
!     if __debug__: t0 = time.time()
      data = [Int() for x in xrange(N)]
!     if __debug__: t1 = time.time()
!     if __debug__: print "%.3f" % (t1-t0)
      print "A", data[:K], data[N//2:N//2+K], data[-K:]
      sortum(data)
--- 58,72 ----
          print "using", cmp.__name__
          data.sort(cmp)
!     ##if __debug__: t1 = time.time()
      print "Z", data[:K], data[N//2:N//2+K], data[-K:]
      print compares,
!     ##if __debug__:  print "%.3f" % (t1-t0),
      print
  
  def main():
!     ##if __debug__: t0 = time.time()
      data = [Int() for x in xrange(N)]
!     ##if __debug__: t1 = time.time()
!     ##if __debug__: print "%.3f" % (t1-t0)
      print "A", data[:K], data[N//2:N//2+K], data[-K:]
      sortum(data)

Index: out3
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/parrotbench/out3,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** out3	31 Dec 2003 00:10:34 -0000	1.1
--- out3	31 Dec 2003 00:12:12 -0000	1.2
***************
*** 1,17 ****
! 0.277
! A [T(290448019)] [T(606178844)] [T(186360231)]
  using None
! Z [T(387083)] [T(1077158269)] [T(2146971462)]
! 0 0.013
  using cmp
! Z [T(387083)] [T(1077158269)] [T(2146971462)]
! 0 0.055
  using icmp
! Z [T(387083)] [T(1077158269)] [T(2146971462)]
! 119885 0.265
  using None
! Z [T(387083)] [T(1077158269)] [T(2146971462)]
! 119885 0.331
  using None
! Z [T(387083)] [T(1077158269)] [T(2146971462)]
! 0 0.025
--- 1,16 ----
! A [T(290448019)] [T(1487478786)] [T(159903786)]
  using None
! Z [T(387083)] [T(1080738845)] [T(2147439074)]
! 0
  using cmp
! Z [T(387083)] [T(1080738845)] [T(2147439074)]
! 0
  using icmp
! Z [T(387083)] [T(1080738845)] [T(2147439074)]
! 259811
  using None
! Z [T(387083)] [T(1080738845)] [T(2147439074)]
! 259811
  using None
! Z [T(387083)] [T(1080738845)] [T(2147439074)]
! 0





More information about the Python-checkins mailing list