[pypy-commit] pypy rdict-fast-hash: use fast_hash=True for two r_dicts

cfbolz pypy.commits at gmail.com
Mon Dec 11 11:46:50 EST 2017


Author: Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>
Branch: rdict-fast-hash
Changeset: r93368:edf8ee0934a2
Date: 2017-12-11 17:46 +0100
http://bitbucket.org/pypy/pypy/changeset/edf8ee0934a2/

Log:	use fast_hash=True for two r_dicts

diff --git a/pypy/module/_pypyjson/interp_decoder.py b/pypy/module/_pypyjson/interp_decoder.py
--- a/pypy/module/_pypyjson/interp_decoder.py
+++ b/pypy/module/_pypyjson/interp_decoder.py
@@ -71,7 +71,7 @@
         self.ll_chars = rffi.str2charp(s)
         self.end_ptr = lltype.malloc(rffi.CCHARPP.TO, 1, flavor='raw')
         self.pos = 0
-        self.cache = r_dict(slice_eq, slice_hash)
+        self.cache = r_dict(slice_eq, slice_hash, fast_hash=True)
 
     def close(self):
         rffi.free_charp(self.ll_chars)
diff --git a/rpython/jit/metainterp/typesystem.py b/rpython/jit/metainterp/typesystem.py
--- a/rpython/jit/metainterp/typesystem.py
+++ b/rpython/jit/metainterp/typesystem.py
@@ -106,11 +106,11 @@
     # It is an r_dict on lltype.  Two copies, to avoid conflicts with
     # the value type.  Note that NULL is not allowed as a key.
     def new_ref_dict(self):
-        return r_dict(rd_eq, rd_hash)
+        return r_dict(rd_eq, rd_hash, fast_hash=True)
     def new_ref_dict_2(self):
-        return r_dict(rd_eq, rd_hash)
+        return r_dict(rd_eq, rd_hash, fast_hash=True)
     def new_ref_dict_3(self):
-        return r_dict(rd_eq, rd_hash)
+        return r_dict(rd_eq, rd_hash, fast_hash=True)
 
     def cast_vtable_to_hashable(self, cpu, ptr):
         adr = llmemory.cast_ptr_to_adr(ptr)


More information about the pypy-commit mailing list