JIT compilation makes Javascript faster, but it is not by any metric "fast".
8 karma · joined October 13, 2022
JIT compilation makes Javascript faster, but it is not by any metric "fast".
It is absurdly slow compared to any compiled language.
> Even React isn't all that slow.
Yes, it is.
> I don't know what it is yet (happy to be pointed somewhere) [..]
It is using a web browser to show some text and images.
Yes and no. The main source of slowness in modern software is memory access (patterns). Yes, a binary search is just O(log(n)) but if your array isn't to big a linear search will probably be faster, just because the chance of your data being in cache is much higher due to prefetching.
But it's much harder to plan, program or to refactor software to have a cache friendly memory layout and access pattern. And good luck optimizing your Java, Python, etc. code with respect to memory when even integers are pointers to some data on the heap...