Re: [Python-Dev] Cost-Free Slice into FromString constructors--Long

2006-05-25 Thread Runar Petursson
On 5/25/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: If you really need this for speed, I recommend you make it a custom extension. The custom extension is a good idea, and what we do now.  But now that the long algorithm is so fast, it would be nice to expose it at least at the C level to use a

[Python-Dev] Cost-Free Slice into FromString constructors--Long

2006-05-25 Thread Runar Petursson
We've been talking this week about ideas for speeding up the parsing of Longs coming out of files or network.  The use case is having a large string with embeded Long's and parsing them to real longs.  One approach would be to use a simple slice: long(mystring[x:y]) an expensive operation in a tigh