Out of cpu registers!

Everything else that doesn't fall into one of the other PB categories.
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Post by dell_jockey »

srod wrote:Now that's a different issue completely! :)
Indeed, it is!

I just couldn't resist the chance to add this angle...
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Thing is, whilst you are correct and that my given example should only compile to a single MOV instruction, you'd have to say that the original programmer would be at fault here (i.e. me) for conceiving such an appalling piece of code.

I'd say that it would be my responsibility to optimise this particular piece of code.

It's similar to:

Code: Select all

x = 10
x = 20
only a real banana head would code the above and so, the question is, should we really expect the compiler to look out for such redundancies?

One thing I love about PB is the speed of compilation. Try an optimising c++ compiler - God it takes forever to compile anything!

It's a fine line I reckon.
I may look like a mule, but I'm not a complete ass.
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post by GedB »

And if the optimiser compiler ever gets it wrong, tracking down the bugs can be a nightmare.

With PB I can get the commented ASM and quickly diagnose even compiler errors.

Again, PB keeps it simple. If you want to have the value evaluated at compile time, you just replace x, y, z with #x, #y, #z.

Again, I see this as a benefit of PB. It makes things easy for me, but never takes control away from me.

Thats how I like it, thats why I use PB.
Post Reply