[Win32utils-devel] Speeding up win32-eventlog
phasis at gmail.com
Sat Aug 25 22:58:14 EDT 2007
2007/8/26, Daniel Berger <djberg96 at gmail.com>:
> Hi all,
> I released win32-eventlog 0.4.5 today. It's still a bit on the slow
> side. The profiler (and general testing) indicates that it's line 696
> that's the major culprit:
> va_list = str.split(0.chr)[0...num]
> Other than changing 0.chr to a literal "\0", does anyone have a way to
> speed this up?
> It's not crucial, but I thought it might make a nice benchmarking
> challenge for folks on the list. :)
How about this?
va_list = str.unpack('Z*' * num)
In my test, it is faster thousandfold than split.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the win32utils-devel