Author lemburg
Recipients amaury.forgeotdarc, kevinwatters, lemburg, loewis, pitrou
Date 2009-01-08.19:37:36
SpamBayes Score 0.138125
Marked as misclassified No
Message-id <>
In-reply-to <>
Antoine Pitrou wrote:
> Antoine Pitrou <> added the comment:
> Attached patch adds acceleration for latin1 and utf16 decoding as well. 
> All three codecs (utf8, utf16, latin1) are now in the same ballpark
> performance-wise on favorable input: on my machine, they are able to
> decode at almost 1GB/s.
> (unpatched, it is between 150 and 500MB/s. depending on the codec)
> Added file:

A few style comments:

 * please use indented #pre-processor directives whenever possible, e.g.
   # define
   # define

 * the conditions should only accept SIZE_OF_LONG == 4 and 8 and
   fail with an #error for any other value

 * you should use unsigned longs instead of signed ones

 * please use spaces around arithmetic operators, e.g. not a+b, but
   a + b

 * when calling functions with lots of parameters, put each parameter on
   a new line (e.g. for unicode_decode_call_errorhandler())

Please also add a comment somewhere to the bit masks explaining what
they do and how they are used. Verbose comments are always good to
have when doing optimizations such as these. Have a look at the
dictionary implementation for what I mean by this.

Marc-Andre Lemburg


::: Try our new mxODBC.Connect Python Database Interface for free ! :::: Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
Date User Action Args
2009-01-08 19:37:38lemburgsetrecipients: + lemburg, loewis, amaury.forgeotdarc, pitrou, kevinwatters
2009-01-08 19:37:37lemburglinkissue4868 messages
2009-01-08 19:37:37lemburgcreate