Message199139
| Author |
pitrou |
| Recipients |
christian.heimes, ncoghlan, pitrou |
| Date |
2013年10月07日.11:12:12 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<492141168.56245134.1381144326751.JavaMail.root@zimbra10-e2.priv.proxad.net> |
| In-reply-to |
<1381143456.3.0.948803349956.issue19183@psf.upfronthosting.co.za> |
| Content |
> 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? |
|