STINNER Victor added the comment:
P.S. I rather like the optimization and don't want to discourage it. I'm
just curious about what the current optimizations are missing.
I'm too lazy to produce more statistics or run other benchmarks. I just saw an
interesting optimization oportunity. I
Changes by Meador Inge mead...@gmail.com:
--
nosy: +meador.inge
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16286
___
___
Python-bugs-list
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16286
___
STINNER Victor added the comment:
Oh, I forgot this issue when I did the following commit:
--
changeset: 79902:b68be1025c42
user:Victor Stinner victor.stin...@gmail.com
date:Tue Oct 23 02:48:49 2012 +0200
files: Objects/unicodeobject.c
description:
Optimize
Raymond Hettinger added the comment:
Rather than see statistics, I'm curious about what circumstances where the
optimization would kick in. Interned strings are pre-hashed but they already
benefit from an identity-implies-equality check. Dicts and sets already
incorporate a
Gregory P. Smith added the comment:
something to include in your statistics is the lengths of the already hashed
data being compared.
i expect there to be a minimum length before this optimization is useful.
--
nosy: +gregory.p.smith
___
Python
New submission from STINNER Victor:
Attached patch optimize a==b and a!=b operators for bytes and str types of
Python 3.4. For str, memcmp() is now always used, instead of a loop using
PyUnicode_READ() (which is slow) for kind different than 1. For bytes, compare
the first but also the last
Serhiy Storchaka added the comment:
Good. I would like to see similar statistics tests for any real application.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16286
___
Changes by Dirkjan Ochtman dirk...@ochtman.nl:
--
nosy: +djc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16286
___
___
Python-bugs-list mailing
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16286
___
___
10 matches
Mail list logo