On Jan 22, 12:15 am, Paddy <[EMAIL PROTECTED]> wrote:
> On Jan 22, 3:20 am, Alan Isaac <[EMAIL PROTECTED]> wrote:> I want to generate 
> sequential pairs from a list.
> <<snip>>
> > What is the fastest way? (Ignore the import time.)
>
> 1) How fast is the method you have?
> 2) How much faster does it need to be for your application?
> 3) Are their any other bottlenecks in your application?
> 4) Is this the routine whose smallest % speed-up would give the
> largest overall speed up of your application?

I believe the "what is the fastest way" question for such small well-
defined tasks is worth asking on its own, regardless of whether it
makes a difference in the application (or even if there is no
application to begin with). Just because cpu cycles are cheap these
days is not a good reason to be sloppy. Moreover, often the fastest
pure Python version happens to be among the most elegant and concise,
unlike other languages where optimization usually implies obfuscation.

George
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to