About speed

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

I need to answer the other part of your question.

Jeremy Cowgar wrote:
> The variables that while cond2, cond3,
> etc... need to access from the original calling function?

Of course, in my example you'd have to pass in any values needed by the
internal conditions which is slower.  I've seen this argument taken to
the extreme where NO parameters are passed, just make all variables global.

I'm sure you see the problem with that.

I don't know if you know the history of Microsoft basic compilers.

Originally GWBasic (an interpreter) used line numbers.  In the 1980's we
had BASCOM where you could use labels.  What power and freedom that was!
I loved it and it was fast (I might have mentioned that I turned a 16 hour
report into a 30 minute report using it to process millions of customers.)

Then came QuickBasic which was much slower than BASCOM.  VB was slower
than QuickBasic.  I've stayed away from dotNet, but I imagine it's slower
too.  The only thing that's saved us is that the hardware keeps getting
incredibly faster.

Bottom line Jeremy, speed is not the biggest issue generally.  If you want
really fast, hand coded machine language is the way to go, although
optimized C is still a better starting point.

Me, I just want to use one language.  Actually just one dialect of one
language.  Every time I have to look at a manual, that's the speed issue
that bothers me most.

Most speed issues can be addressed by more inline code.  It's the last thing
I would optimize for because generally it means making your code less
readable.  I haven't used or missed gotos in decades.

I could recode the example with the additional constraint of no calls, but
the result wouldn't be something I'd normally do.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu