3 ms·
These are impressive performance numbers. > Because operations end with a call to the next function, the C compiler will tail-call optimize most operations. I
by haberman 7y ago
These are impressive performance numbers.
> Because operations end with a call to the next function, the C compiler will tail-call optimize most operations.
It appears that this relies on tail-call optimization to avoid overflowing the stack. Unfortunately this means you probably can't run it in debug mode.
- vshymanskyy 7y agoIt's not that bad even in debug mode (or without TCO). Just not optimal. Also, there is a way to rework this part, so it does not rely on compiler TCO.
- haberman 7y agoIf the jump to the next opcode is a tail call, wouldn't an arbitrarily long sequence of instructions take arbitrarily much stack space?