3 ms·
> BUT I THOUGHT V8 / MODERN JS HAD NEAR-C PERFORMANCE? > It depends on what you mean by “near”. If your C program executes in 10ms, then a 50ms JavaScript pro
by baddox 13y ago
> BUT I THOUGHT V8 / MODERN JS HAD NEAR-C PERFORMANCE?
> It depends on what you mean by “near”. If your C program executes in 10ms, then a 50ms JavaScript program would be “near-C” speed. If your C program executes in 10 seconds, a 50-second JavaScript program, for most ordinary people would probably not be near-C speed.
I would actually reverse those two examples. A 10 second to 50 second jump probably wouldn't affect most user-facing programs that much, since it's either being done in the background or the user is staring at a progress bar. The UI of the application is probably (hopefully) already designed around the fact that there is a long-running process. But a 10ms to 50ms increase can be a big deal, since it's probably something that is intended to appear "instant" to the user.