Message199139
> 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? |
|
Date |
User |
Action |
Args |
2013-10-07 11:12:12 | pitrou | set | recipients:
+ pitrou, ncoghlan, christian.heimes |
2013-10-07 11:12:12 | pitrou | link | issue19183 messages |
2013-10-07 11:12:12 | pitrou | create | |
|