[issue5885] uuid.uuid1() is too slow

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: Hum, there are many open uuid issues which propose similar changes. I close this issue in favor of bpo-11063. Please continue the discussion there. -- nosy: +haypo resolution: -> duplicate stage: patch review -> resolved status: open -> closed superse

[issue5885] uuid.uuid1() is too slow

2017-09-21 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3673 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue5885] uuid.uuid1() is too slow

2015-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And issue15206. Python implementation has a drawback. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue5885] uuid.uuid1() is too slow

2015-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue11063 and issue20519. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue5885] uuid.uuid1() is too slow

2015-04-09 Thread R. David Murray
R. David Murray added the comment: The original report says the ctypes call is slower than the python code used as a fallback. Would it not, then, be a performance improvement just to drop the ctypes call, without creating a new C module? Creating a C module would then be a separate enhancem

[issue5885] uuid.uuid1() is too slow

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I agree that there is a maintenance cost associated with C extension modules. However, I would certainly be glad if it allowed us to eliminate uses of ctypes in this module because ctypes is quite unsafe and doesn't work well across platforms (though it

[issue5885] uuid.uuid1() is too slow

2013-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Instead hexadecimals in _long_from_uuid_t you can use _PyLong_FromByteArray. However adding new C implemented module has hight cost. I doubt that the speed up of UUID generation is worth this cost. -- nosy: +serhiy.storchaka

[issue5885] uuid.uuid1() is too slow

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- priority: low -> normal stage: needs patch -> patch review versions: +Python 3.5 -Python 2.7, Python 3.2 ___ Python tracker ___ __

[issue5885] uuid.uuid1() is too slow

2011-01-24 Thread David Stanek
Changes by David Stanek : -- nosy: +dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue5885] uuid.uuid1() is too slow

2011-01-22 Thread Ross Lagerwall
Ross Lagerwall added the comment: Attached is a patch based on the original patch, meant to have better performance. On my PC, this: import sys, time, uuid def uu(n): t = time.time() for x in range(n): uuid.uuid1() print('%.3f microseconds' % ((time.time() - t) * 100.

[issue5885] uuid.uuid1() is too slow

2009-09-23 Thread Thijs Triemstra
Changes by Thijs Triemstra : -- nosy: +thijs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue5885] uuid.uuid1() is too slow

2009-09-01 Thread Daniel Black
Daniel Black added the comment: to prove it a bit more - ctype benchmark >>> import ctypes, ctypes.util >>> def uu1(n): ... t = time.time() ... _buffer = ctypes.create_string_buffer(16) ... for x in range(n): ... uuid._uuid_generate_time(_buffer) ... print('%.3f micro

[issue5885] uuid.uuid1() is too slow

2009-09-01 Thread Daniel Black
Daniel Black added the comment: This is a slightly crude module version. The speedups were only 10% Python 3.2a0 (py3k:74612M, Sep 1 2009, 18:11:58) [GCC 4.3.2] on linux2 Using the same test from Wang Chun: before: uuid1(100) 101.759 microseconds after: uuid1(100

[issue5885] uuid.uuid1() is too slow

2009-07-06 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Can you provide a patch? -- nosy: +alexandre.vassalotti priority: -> low stage: -> needs patch versions: +Python 3.2 -Python 2.4, Python 2.5, Python 2.6, Python 3.0, Python 3.1 ___ Python tracker

[issue5885] uuid.uuid1() is too slow

2009-04-30 Thread Wang Chun
Wang Chun added the comment: This is my test on another faster machine. $ cat test.py import sys, time, uuid N = int(sys.argv[1]) t = time.time() for x in xrange(N): uuid.uuid1() print('%.3f microseconds' % ((time.time() - t) * 100.0 / N)) $ cat test.c #include #include #include int

[issue5885] uuid.uuid1() is too slow

2009-04-30 Thread Wang Chun
New submission from Wang Chun : uuid.uuid1() currently uses two different ways to generate a uuid. If the system call "uuid_generate_time" is available, uuid1() uses the system call via the ctypes interface, otherwise, it uses pure Python code to generate a uuid. The problem is, the C interfac