Author serhiy.storchaka
Recipients alex, kevinlondon, rhettinger, ronaldoussoren, serhiy.storchaka
Date 2014-08-04.08:09:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1407139740.79.0.55419761126.issue22131@psf.upfronthosting.co.za>
In-reply-to
Content
If such changes are acceptable, here is a part of my large patch fo modernizing stdlib sources.

Some microbenchmarks:

$ ./python -m timeit -s "from uuid import NAMESPACE_DNS as u" -- "u.bytes"
$ ./python -m timeit -s "from uuid import NAMESPACE_DNS as u" -- "u.bytes_le"
$ ./python -m timeit -s "from uuid import UUID" -- "UUID(bytes_le=b'abcdefghijklmnop')"

Before patch:
10000 loops, best of 3: 66.9 usec per loop
10000 loops, best of 3: 102 usec per loop
10000 loops, best of 3: 65.2 usec per loop

After patch:
100000 loops, best of 3: 3.98 usec per loop
100000 loops, best of 3: 10.8 usec per loop
10000 loops, best of 3: 32.1 usec per loop
History
Date User Action Args
2014-08-04 08:09:00serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, ronaldoussoren, alex, kevinlondon
2014-08-04 08:09:00serhiy.storchakasetmessageid: <1407139740.79.0.55419761126.issue22131@psf.upfronthosting.co.za>
2014-08-04 08:09:00serhiy.storchakalinkissue22131 messages
2014-08-04 08:09:00serhiy.storchakacreate