4 ms·
Not even remotely... To setup for a call to a C function is a matter of a handfull of instructions. To setup a context switch is hundreds.
by TickleSteve 11y ago
Not even remotely...
To setup for a call to a C function is a matter of a handfull of instructions.
To setup a context switch is hundreds.
- jerf 11y agoIf you're talking about kernel context switches, the JS has them too, and then has more instructions to set up the JS call stack to boot. Setting up a million JS call stacks is not necessarily trivial. A million here, a million there, soon you're talking real wall-clock time.