Author: Armin Rigo <ar...@tunes.org> Branch: rpython-hash Changeset: r89788:b24fe8a08009 Date: 2017-01-26 15:00 +0100 http://bitbucket.org/pypy/pypy/changeset/b24fe8a08009/
Log: better fast path diff --git a/rpython/rtyper/lltypesystem/rordereddict.py b/rpython/rtyper/lltypesystem/rordereddict.py --- a/rpython/rtyper/lltypesystem/rordereddict.py +++ b/rpython/rtyper/lltypesystem/rordereddict.py @@ -876,7 +876,7 @@ ll_dict_reindex(d, new_size) def ll_dict_create_index(d): - if d.num_live_items == 0: + if d.num_live_items < DICT_INITSIZE * 2 // 3: new_size = DICT_INITSIZE # fast path else: # Use a more conservative estimate than _ll_dict_resize_to() here. _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit