Originally Posted by idrougge
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
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.