Message92137
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(1000000)
101.759 microseconds
after:
uuid1(1000000)
91.663 microseconds
The delays are clearly in the _byte array copying as indicated by the
test below:
>>> import sys, time, uuid
>>> def uu(n):
... t = time.time()
... for x in range(n):
... uuid._uuid_generate_time_fast()
... print('%.3f microseconds' % ((time.time() - t) * 1000000.0 / n))
...
[72265 refs]
>>> uu(1000000)
13.157 microseconds
[72267 refs]
I would expect fixing this for the ctypes version would have a similar
speedup. |
|
Date |
User |
Action |
Args |
2009-09-01 09:12:44 | grooverdan | set | recipients:
+ grooverdan, alexandre.vassalotti, wangchun |
2009-09-01 09:12:44 | grooverdan | set | messageid: <1251796364.78.0.495649374232.issue5885@psf.upfronthosting.co.za> |
2009-09-01 09:12:42 | grooverdan | link | issue5885 messages |
2009-09-01 09:12:42 | grooverdan | create | |
|