Antoine Pitrou added the comment:

> Your benchmark is a bit unrealistic because it times the hash cache
> most of the time. Here is a better benchmark (but bytes-only):
> 
> $ ./python -m timeit -s "words=[w.encode('utf-8') for line in
> open('../LICENSE') for w in line.split()]; import collections" -- "c
> = collections.Counter(memoryview(w) for w in words);
> c.most_common(10)"
> 1000 loops, best of 3: 1.63 msec per loop

Good point. Can you also post all benchmark results?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19183>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to