Originally Posted by Mrs Beanbag
yeah yeah fair enough i do know how function calls work at the low level, but pushing a couple of 32 bit integers on the stack really doesn't account for how slow AMOS's procedure calls are, there must be something else going on there.
Most likely it's extending the variables area, assigning variable names into that area (string writes per variable) and then the variable values so that the procedure just has to use them like any other variables in the list. That would be a lot
slower than just writing an integer to a memory location - and of course, exiting the procedure means having to destroy those variables and reclaim the RAM they occupied...
That's just speculation though; I've not read the Amos source code.