[Python-Dev] Python Benchmarks

Fredrik Lundh fredrik at pythonware.com
Wed Jun 7 19:20:53 CEST 2006


M.-A. Lemburg wrote:

> One interesting difference I found while testing on Windows
> vs. Linux is that the StringMappings test have quite a different
> run-time on both systems: around 2500ms on Windows vs. 590ms
> on Linux (on Python 2.4). UnicodeMappings doesn't show such
> a signficant difference.
> 
> Perhaps the sprint changed this ?!

nope.

but stringbench revealed the same thing, of course.

the difference is most likely due to an inefficient implementation of 
locale-aware character lookups in Visual C (MSVC supports passing wide 
chars, but I don't think gcc bothers to do that; afaik, it's not part of 
the C standard).

solving this is straightforward (let the locale module set a global flag 
if Python runs under a non-C locale, and use a built-in table as long as 
that flag isn't set), but I haven't gotten around to deal with that yet.

</F>



More information about the Python-Dev mailing list