Multiple equates

Tim Roberts timr at probo.com
Thu Nov 20 07:12:06 CET 2008


jzakiya <jzakiya at mail.com> wrote:
>
>I looked online and in books, but couldn't find a definitive answer to
>this.
>
>I have an array and set multiple elements to either True or False at
>one time.
>
>Question: Which way is faster (or does it matter)?

Answer: it does not matter.  This is premature optimization.  First, make
it work.  Then, figure out whether it is fast enough.  THEN, figure out
what's taking the most time.

I'd be very, very surprised if this was an important part of your run time.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list