Anonymous avatar Anonymous committed 26d53ce

Update targetbigintbenchmark.py, apperently it wasn't patched properly so it had old results.

Comments (0)

Files changed (1)

pypy/translator/goal/targetbigintbenchmark.py

 #! /usr/bin/env python
 
-import os, sys
+import sys
 from time import time
-from pypy.rlib.rbigint import rbigint, _k_mul
+from pypy.rlib.rbigint import rbigint
 
 # __________  Entry point  __________
 
         Sum:  142.686547
         
         Pypy with improvements:
-        mod by 2:  0.006321
-        mod by 10000:  3.143117
-        mod by 1024 (power of two):  0.009611
-        Div huge number by 2**128: 2.138351
-        rshift: 2.247337
-        lshift: 1.334369
-        Floordiv by 2: 1.555604
-        Floordiv by 3 (not power of two): 4.275014
-        2**500000: 0.033836
-        (2**N)**5000000 (power of two): 0.049600
-        10000 ** BIGNUM % 100 1.326477
-        i = i * i: 3.924958
-        n**10000 (not power of two): 6.335759
-        Power of two ** power of two: 0.013380
-        v = v * power of two 3.497662
-        v = v * v 6.359251
-        v = v + v 2.785971
-        Sum:  39.036619
+        mod by 2:  0.007059
+        mod by 10000:  3.204295
+        mod by 1024 (power of two):  0.009401
+        Div huge number by 2**128: 1.368511
+        rshift: 2.345295
+        lshift: 1.339761
+        Floordiv by 2: 1.532028
+        Floordiv by 3 (not power of two): 4.005607
+        2**500000: 0.033466
+        (2**N)**5000000 (power of two): 0.047093
+        10000 ** BIGNUM % 100 1.207310
+        i = i * i: 3.998161
+        n**10000 (not power of two): 6.323250
+        Power of two ** power of two: 0.013258
+        v = v * power of two 3.567459
+        v = v * v 6.316683
+        v = v + v 2.757308
+        Sum:  38.075946
 
+        # Notice: This is slightly old!
         With SUPPORT_INT128 set to False
         mod by 2:  0.004103
         mod by 10000:  3.237434
 
     """
     sumTime = 0.0
-    
-    
-    """t = time()
-    by = rbigint.fromint(2**62).lshift(1030000)
-    for n in xrange(5000):
-        by2 = by.lshift(63)
-        _tc_mul(by, by2)
-        by = by2
-        
 
-    _time = time() - t
-    sumTime += _time
-    print "Toom-cook effectivity _Tcmul 1030000-1035000 digits:", _time
-    
-    t = time()
-    by = rbigint.fromint(2**62).lshift(1030000)
-    for n in xrange(5000):
-        by2 = by.lshift(63)
-        _k_mul(by, by2)
-        by = by2
-        
-
-    _time = time() - t
-    sumTime += _time
-    print "Toom-cook effectivity _kMul 1030000-1035000 digits:", _time"""
-    
-    
     V2 = rbigint.fromint(2)
     num = rbigint.pow(rbigint.fromint(100000000), rbigint.fromint(1024))
     t = time()
     return entry_point, None
 
 if __name__ == '__main__':
-    import sys
     res = entry_point(sys.argv)
     sys.exit(res)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.