Author: Armin Rigo <[email protected]>
Branch: rpython-hash
Changeset: r89825:96df52d20b1b
Date: 2017-01-28 18:09 +0100
http://bitbucket.org/pypy/pypy/changeset/96df52d20b1b/

Log:    Add get_ll_fasthash_function on NoneRepr (though that's only for
        dicts whose only key is None). Add comments elsewhere.

diff --git a/rpython/rtyper/rfloat.py b/rpython/rtyper/rfloat.py
--- a/rpython/rtyper/rfloat.py
+++ b/rpython/rtyper/rfloat.py
@@ -26,6 +26,9 @@
     def get_ll_hash_function(self):
         return _hash_float
 
+    # no get_ll_fasthash_function: the hash is a bit slow, better cache
+    # it inside dict entries
+
     def rtype_bool(_, hop):
         vlist = hop.inputargs(Float)
         return hop.genop('float_is_true', vlist, resulttype=Bool)
diff --git a/rpython/rtyper/rnone.py b/rpython/rtyper/rnone.py
--- a/rpython/rtyper/rnone.py
+++ b/rpython/rtyper/rnone.py
@@ -25,6 +25,8 @@
     def get_ll_hash_function(self):
         return ll_none_hash
 
+    get_ll_fasthash_function = get_ll_hash_function
+
     rtype_simple_call = none_call
     rtype_call_args = none_call
 
diff --git a/rpython/rtyper/rtuple.py b/rpython/rtyper/rtuple.py
--- a/rpython/rtyper/rtuple.py
+++ b/rpython/rtyper/rtuple.py
@@ -208,6 +208,9 @@
     def get_ll_hash_function(self):
         return gen_hash_function(self.items_r)
 
+    # no get_ll_fasthash_function: the hash is a bit slow, better cache
+    # it inside dict entries
+
     ll_str = property(gen_str_function)
 
     def make_iterator_repr(self, variant=None):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to