[pypy-svn] r66049 - pypy/branch/pyjitpl5/pypy/interpreter
arigo at codespeak.net
arigo at codespeak.net
Tue Jun 30 16:35:38 CEST 2009
Author: arigo
Date: Tue Jun 30 16:35:35 2009
New Revision: 66049
Added:
pypy/branch/pyjitpl5/pypy/interpreter/pycode.py.merge.tmp
- copied, changed from r66039, pypy/branch/pyjitpl5/pypy/interpreter/pycode.py
Log:
merging of svn+ssh://codespeak.net/svn/pypy/trunk/pypy/interpreter/pycode.py
revisions 62865 to 66039:
------------------------------------------------------------------------
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
------------------------------------------------------------------------
Copied: pypy/branch/pyjitpl5/pypy/interpreter/pycode.py.merge.tmp (from r66039, pypy/branch/pyjitpl5/pypy/interpreter/pycode.py)
==============================================================================
--- pypy/branch/pyjitpl5/pypy/interpreter/pycode.py (original)
+++ pypy/branch/pyjitpl5/pypy/interpreter/pycode.py.merge.tmp Tue Jun 30 16:35:35 2009
@@ -111,6 +111,10 @@
self._compute_flatcall()
+ if space.config.objspace.std.withcelldict:
+ from pypy.objspace.std.celldict import init_code
+ init_code(self)
+
co_names = property(lambda self: [self.space.unwrap(w_name) for w_name in self.co_names_w]) # for trace
def signature(self):
More information about the Pypy-commit
mailing list