[pypy-svn] r66060 - pypy/branch/pyjitpl5/pypy/objspace/std

arigo at codespeak.net arigo at codespeak.net
Tue Jun 30 16:38:46 CEST 2009


Author: arigo
Date: Tue Jun 30 16:38:45 2009
New Revision: 66060

Added:
   pypy/branch/pyjitpl5/pypy/objspace/std/dictmultiobject.py.merge.tmp
      - copied, changed from r66039, pypy/branch/pyjitpl5/pypy/objspace/std/dictmultiobject.py
Log:
merging of svn+ssh://codespeak.net/svn/pypy/trunk/pypy/objspace/std/dictmultiobject.py
revisions 62865 to 66039:

    ------------------------------------------------------------------------
    r65449 | cfbolz | 2009-05-27 14:41:46 +0200 (Wed, 27 May 2009) | 2 lines
    
    Get rid of a superfluous argument to __init__. Thanks Amaury for being wary.
    
    ------------------------------------------------------------------------
    r65444 | cfbolz | 2009-05-27 14:03:00 +0200 (Wed, 27 May 2009) | 99 lines
    
    merge speedup-global2 branch:
            ------------------------------------------------------------------------
        r62765 | cfbolz | 2009-03-09 17:53:28 +0100 (Mon, 09 Mar 2009) | 3 lines
        Changed paths:                                                          
           A /pypy/branch/speedup-globals (from /pypy/trunk:62764)              
    
        A branch to try Armin's and mine newest idea about how to speed up global
        lookups.                                                                 
    
        ------------------------------------------------------------------------
        r62773 | cfbolz | 2009-03-09 19:02:50 +0100 (Mon, 09 Mar 2009) | 5 lines
        Changed paths:                                                          
           M /pypy/branch/speedup-globals/pypy/config/pypyoption.py             
           M /pypy/branch/speedup-globals/pypy/interpreter/module.py            
           M /pypy/branch/speedup-globals/pypy/objspace/fake/objspace.py        
           M /pypy/branch/speedup-globals/pypy/objspace/reflective.py           
           M /pypy/branch/speedup-globals/pypy/objspace/std/dictmultiobject.py  
           M /pypy/branch/speedup-globals/pypy/objspace/std/objspace.py         
           M /pypy/branch/speedup-globals/pypy/objspace/std/test/test_dictmultiobject.py
           M /pypy/branch/speedup-globals/pypy/objspace/std/test/test_dictobject.py     
    
        First step to make global lookups faster: Introduce a special dict
        implementation for modules, where every value in the RPython-level dict is a
        cell that contains the real value. As long as the "valid" flag on such a cell is
        set, it is safe to store the cell somewhere else.                               
    
        ------------------------------------------------------------------------
        r62811 | cfbolz | 2009-03-10 16:00:52 +0100 (Tue, 10 Mar 2009) | 2 lines
        Changed paths:                                                          
           A /pypy/branch/speedup-globals/pypy/objspace/std/celldict.py
           M /pypy/branch/speedup-globals/pypy/objspace/std/dictmultiobject.py
           M /pypy/branch/speedup-globals/pypy/objspace/std/objspace.py
           A /pypy/branch/speedup-globals/pypy/objspace/std/test/test_celldict.py
           M /pypy/branch/speedup-globals/pypy/objspace/std/test/test_dictmultiobject.py
    
        Actually use the cell-dict stuff to cache global lookups in frames.
    
        ------------------------------------------------------------------------
        r62816 | cfbolz | 2009-03-10 16:34:17 +0100 (Tue, 10 Mar 2009) | 2 lines
        Changed paths:
           M /pypy/branch/speedup-globals/pypy/objspace/std/celldict.py
    
        help flow space
    
        ------------------------------------------------------------------------
        r62819 | cfbolz | 2009-03-10 17:54:44 +0100 (Tue, 10 Mar 2009) | 2 lines
        Changed paths:
           M /pypy/branch/speedup-globals/pypy/translator/benchmark/benchmarks.py
    
        fix typo
    
        ------------------------------------------------------------------------
        r62823 | cfbolz | 2009-03-10 17:57:56 +0100 (Tue, 10 Mar 2009) | 2 lines
        Changed paths:
           M /pypy/branch/speedup-globals/pypy/translator/benchmark/benchmarks.py
    
        fix gadfly
    
        ------------------------------------------------------------------------
        r62827 | cfbolz | 2009-03-10 19:07:12 +0100 (Tue, 10 Mar 2009) | 4 lines
        Changed paths:
           M /pypy/branch/speedup-globals/pypy/interpreter/pycode.py
           M /pypy/branch/speedup-globals/pypy/objspace/std/celldict.py
    
        It turns out that using one additional dict lookup per call negates many of the
        benefits of this optimization. Therefore, attach the cache to the code object
        directly.
    
        ------------------------------------------------------------------------
        r62830 | cfbolz | 2009-03-10 20:38:30 +0100 (Tue, 10 Mar 2009) | 2 lines
        Changed paths:
           M /pypy/branch/speedup-globals/pypy/translator/microbench/test_count1.py
    
        two more microbenchmarks
    
        ------------------------------------------------------------------------
        r62845 | cfbolz | 2009-03-11 11:54:45 +0100 (Wed, 11 Mar 2009) | 2 lines
        Changed paths:
           M /pypy/branch/speedup-globals/pypy/objspace/std/celldict.py
           M /pypy/branch/speedup-globals/pypy/objspace/std/test/test_celldict.py
    
        get rid of invalid flag
    
        ------------------------------------------------------------------------
        r62856 | cfbolz | 2009-03-11 13:16:33 +0100 (Wed, 11 Mar 2009) | 2 lines
        Changed paths:
           M /pypy/branch/speedup-globals/pypy/objspace/std/celldict.py
           M /pypy/branch/speedup-globals/pypy/objspace/std/test/test_celldict.py
    
        fix a corner-case
    
        ------------------------------------------------------------------------
        r65410 | cfbolz | 2009-05-25 14:34:08 +0200 (Mon, 25 May 2009) | 2 lines
        Changed paths:
           A /pypy/branch/speedup-global2/pypy/doc/config/objspace.std.withcelldict.txt
    
        add missing documentation
    
    
    ------------------------------------------------------------------------
    r64166 | arigo | 2009-04-16 15:26:16 +0200 (Thu, 16 Apr 2009) | 2 lines
    
    (cfbolz, pedronis)  Merge the branch.
    
    ------------------------------------------------------------------------
    r63865 | pedronis | 2009-04-08 18:42:06 +0200 (Wed, 08 Apr 2009) | 3 lines
    
    making a branch to check-in my WIP work, it is at least not broken with -O0 so something stranger is going on
    
    
    ------------------------------------------------------------------------


Copied: pypy/branch/pyjitpl5/pypy/objspace/std/dictmultiobject.py.merge.tmp (from r66039, pypy/branch/pyjitpl5/pypy/objspace/std/dictmultiobject.py)
==============================================================================
--- pypy/branch/pyjitpl5/pypy/objspace/std/dictmultiobject.py	(original)
+++ pypy/branch/pyjitpl5/pypy/objspace/std/dictmultiobject.py.merge.tmp	Tue Jun 30 16:38:45 2009
@@ -868,7 +868,6 @@
         else:
             return None
 
-
 import time, py
 
 class DictInfo(object):
@@ -1041,8 +1040,11 @@
 class W_DictMultiObject(W_Object):
     from pypy.objspace.std.dicttype import dict_typedef as typedef
 
-    def __init__(w_self, space, wary=False, sharing=False):
-        if space.config.objspace.opcodes.CALL_LIKELY_BUILTIN and wary:
+    def __init__(w_self, space, module=False, sharing=False):
+        if space.config.objspace.std.withcelldict and module:
+            from pypy.objspace.std.celldict import ModuleDictImplementation
+            w_self.implementation = ModuleDictImplementation(space)
+        elif space.config.objspace.opcodes.CALL_LIKELY_BUILTIN and module:
             w_self.implementation = WaryDictImplementation(space)
         elif space.config.objspace.std.withdictmeasurement:
             w_self.implementation = MeasuringDictImplementation(space)



More information about the Pypy-commit mailing list