Re: About speed

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jeremy Cowgar wrote:
> 
> ken mortenson wrote: 
> > You can never even tell if you have a speed issue until you run your code.
> 
> I've heard this many times. I am no speed freak, but there are many things
> that
> I *know* will cause a speed problem. If I blindly do all of those things in
> my app and it takes 10 seconds for, say, a file import and I'm happy with
> that,
> why go back and edit?
> 
> However, I know certain things will cause slow downs. Now, I develop the first
> time not using those certain things. Now, the first time around my import
> takes
> 5 seconds. No more/less code, just good common sense.
> 
> That's all I am speaking about when I am talking about functions. Many people
> say, refactor, refactor, refactor. Oh no!!! Your function is more than 3 lines
> long!!! Refactor!!! What? You have nested loops!??!?!? Refactor! Make more
> functions.
> 
> You said none of the above, I am not pointing toward you, but I am simply
> saying
> there are things you can do and should do from the begining if you are worried
> about speed or not.
> 
> Going back and fixing speed issues should be done when you've done a good job
> programming and it's still too slow. All too often the idea of code first,
> optimize
> later means to most people, code sloppy, fix if necessary. I'm not at all for
> that, but I've seen it all too many times in the name of optimizing early is
> evil.
> 
> --
> Jeremy Cowgar
> <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>

Sloppy code sucks, but see my sig.

Of course, I used to have a sig that espoused the virtues and vices of levels of
indirection.

--
A complex system that works is invariably found to have evolved from a simple
system that works.
--John Gall's 15th law of Systemantics.

"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare

j.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu