Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: fastest way...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 10 Topic 5618 of 6457
Post > Topic >>

Re: fastest way to find the first non-zero value in an array

by Vince Hradil <hradilv@[EMAIL PROTECTED] > Apr 8, 2008 at 07:02 AM

On Apr 8, 8:34 am, David Fanning <n...@[EMAIL PROTECTED]
> wrote:
> Vince Hradil writes:
> > Wow - I'd be interested in knowing how slow 'where' is.  Are we
> > talking the difference between 0.01 seconds and 0.05 seconds?  Or even
> > the difference between 1 and 5 seconds?  Time is money, but at what
> > point does our 'need for speed' end?
>
> I've gotten to the point where anything that takes less time
> than it takes to go get a cup of coffee is fast enough. I
> used to think fast, elegant programs were required. But
> when you are writing one-offs day after day, why bother?
> With Starbucks just across the street, I can afford to be
> a little loose with a FOR loop.
>
> Cheers,
>
> David
>
> P.S. That said, I just spent the entire weekend re-working
> a program I inherited from someone else. It is generally a
> good idea to write a program in such a way that someone else
> can get it to work in less time than it takes to write the
> darn thing from scratch. :-)
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Se****e ma de ni thui. ("Perhaps thou speakest truth.")

Exactly - the google-mentality is making everyone think that 10
seconds is too long to wait for anything.  But this makes sense to
me:  it take about 2-4 hours for the scientist to acquire the data for
a certain experiment, it takes me about the same time to create the
one-off and run the analysis for said experiment.  Sure I could spend
about 8 hours to tweak the analysis to make it run in 5 minutes
instead of half-an-hour, but why bother.  Unless, of course we need
that extra half-hour?  Then I end up writing some obfuscated code
(http://en.wikipedia.org/wiki/Obfuscated_code)
that uses histograms,
and the next developer that comes along just says, 'unh?' and re-
writes the whole thing.
 




 10 Posts in Topic:
fastest way to find the first non-zero value in an array
smasson@[EMAIL PROTECTED]  2008-04-08 01:04:48 
Re: fastest way to find the first non-zero value in an array
"Clemens" <y  2008-04-08 10:42:50 
Re: fastest way to find the first non-zero value in an array
Spon <christoph.blau@[  2008-04-08 06:03:51 
Re: fastest way to find the first non-zero value in an array
Vince Hradil <hradilv@  2008-04-08 06:15:22 
Re: fastest way to find the first non-zero value in an array
David Fanning <news@[E  2008-04-08 07:34:38 
Re: fastest way to find the first non-zero value in an array
Spon <christoph.blau@[  2008-04-08 06:56:33 
Re: fastest way to find the first non-zero value in an array
Vince Hradil <hradilv@  2008-04-08 07:02:38 
Re: fastest way to find the first non-zero value in an array
=?ISO-8859-2?Q?F=D6LDY_La  2008-04-08 16:23:04 
Re: fastest way to find the first non-zero value in an array
Rick Towler <rick.towl  2008-04-08 11:41:10 
Re: fastest way to find the first non-zero value in an array
karo03de <karo03de@[EM  2008-04-09 13:02:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 21:43:31 CST 2008.