View Single Post
Old 30 August 2015, 19:00   #378
Registered User

Megol's Avatar
Join Date: May 2014
Location: inside the emulator
Posts: 295
Originally Posted by idrougge View Post
Well, so was I, but I'm not convinced that other languages have function calls for free.
Well... Forth can get very close to free as functions are comparable to gosub statements. OTOH most Forth systems aren't using compilers and emulating a stack architecture on a register machine have some overheads. OTTH (don't we all have a third hand? ;P) a good Forth interpreter can be competitive with a bad compiler for some normal languages.

Edit: Here bad compiler = for example a compiler targeting a register machine that uses a stack based model and a pattern matching code generator.

Originally Posted by Dunny View Post
How many well-designed compilers do we have for the Amiga? I've not kept up with that sort of thing since moving the PC for my coding needs many years ago, so am genuinely interested.

That said, I do agree - a decent optimising compiler will eliminate stack frames where necessary, load registers when possible for function calls and inline if it's of any benefit... but I don't know if any current (or previous) compilers actually have this sort of optimising technology. It would seem that neither the Blitz nor Amos compilers do.
I guess we are talking about BASIC compilers? Otherwise e.g. VBCC seems to optimize well in my limited experience.

Last edited by Megol; 30 August 2015 at 19:15.
Megol is offline  
Page generated in 0.03869 seconds with 10 queries