Paddy <[EMAIL PROTECTED]> writes:
> How does your solution fare against the defaultdict solution of:
>
> d = collections.defaultdict(int)
> for u,s in zip(users,score): d[u] += s

list:         0.931s
dict + "in":  1.495s
defaultdict : 1.991s
dict + "if":  ~2s
dict + "try": ~4s

I've posted the (very rough) code to dpaste:

http://dpaste.com/hold/56468/

Yours
Karsten
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to