Open luser-dr00g opened 8 years ago
Maybe this isn't the best way to improve. If the stack was just contiguous in memory, then we could easily subtract from the pointer in one go. The only complication here is we might be crossing a segment boundary between segments of the stack. But with a special purpose popmany()
function, we could eliminate the second loop entirely and all the separate calls to pop()
.
The function _xpost_operator_push_args_to_hold() does one loop to copy args, and a second loop to pop them from the operand stack.
If we access args in reverse order, this could be simplified to 1 push(pop()) loop.