[issue22131] uuid.bytes optimization

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Alex. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue22131] uuid.bytes optimization

2014-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset f7b5038d3102 by Serhiy Storchaka in branch 'default': Issue #22131: Modernized the code of the uuid module. http://hg.python.org/cpython/rev/f7b5038d3102 New changeset d8c6b15a2ae3 by Serhiy Storchaka in branch '2.7': Issue #22131: Fixed a bug in ha

[issue22131] uuid.bytes optimization

2014-09-06 Thread Alex Gaynor
Alex Gaynor added the comment: Patch looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue22131] uuid.bytes optimization

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Alex, Raymond, could you please make a review of my patch? -- ___ Python tracker ___ ___ Python-bu

[issue22131] uuid.bytes optimization

2014-08-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review versions: -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22131] uuid.bytes optimization

2014-08-04 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- assignee: ronaldoussoren -> components: -Macintosh nosy: -ronaldoussoren ___ Python tracker ___ ___

[issue22131] uuid.bytes optimization

2014-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Just noticed that this patch also fixes a bug. When os.popen() fails in _ipconfig_getnode(), pipe is not set, and then NameError is raised in the finally branch. -- ___ Python tracker

[issue22131] uuid.bytes optimization

2014-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 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" --

[issue22131] uuid.bytes optimization

2014-08-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: I also like the way the patch cleans-up the code. -- nosy: +rhettinger ___ Python tracker ___ ___

[issue22131] uuid.bytes optimization

2014-08-03 Thread Alex Gaynor
Changes by Alex Gaynor : -- versions: +Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue22131] uuid.bytes optimization

2014-08-03 Thread Alex Gaynor
Alex Gaynor added the comment: What I said only applies to the Python3 version of this patch. Thanks for submitting this. -- ___ Python tracker ___ _

[issue22131] uuid.bytes optimization

2014-08-03 Thread Alex Gaynor
Alex Gaynor added the comment: `self.int.to_bytes(16, byteorder='big')` looks to be even faster (about 3x on my machine) -- nosy: +alex ___ Python tracker ___ __

[issue22131] uuid.bytes optimization

2014-08-03 Thread Kevin London
New submission from Kevin London: Generating the byte representation of a UUID object can be a little faster by using binascii's unhexlify on the hex value of the UUID object. In my testing, I saw about a 5.5x speed increase with the attached changes. Here are a set of benchmarks that I ran,