3 ms·
> This ridiculously untrue. at least for JS VMs, this is true today. this answer will certainly vary for other languages/runtimes. i profile and optimize a lo
by leeoniya 4y ago
> This ridiculously untrue.
at least for JS VMs, this is true today. this answer will certainly vary for other languages/runtimes.
i profile and optimize a lot of JS/TS code that handles datasets with millions of datapoints at my day job. but you don't need to take my word for it; this claim is not exactly difficult to verify.
> Do you just play along or begin to explain how incredibly wrong they are?
in this case, i'd prefer to be proven wrong with code, rather than prose.
- vorpalhex 4y agoIt's probably time to move into a faster language if you're getting caught up in language specifics on loop execution.
- leeoniya 4y agoquite impossible to move into a faster language when it would 1. require a complete rewrite of an existing, massive codebase 2. where the primary task is rendering interactive charts for a React web app
- light_hue_1 4y ago> at least for JS VMs, this is true today. this answer will certainly vary for other languages/runtimes. Total nonsense. It is not true of JS today, not has it ever been true. No modern web app's or website's performance is dominated by the performance of what loops you choose. It isn't even remotely meaningfully impacted by that; by this I mean, any differences are totally unmeasurable beyond some 3 line micro-benchmark. You have never benchmarked or profiled your code. Of course, tight inner loops for image processing or ML, etc. yes, this can make a difference. But we're only talking about a handful of loops that matter out of many tens of thousands an application may have, you are almost certainly never writing those loops, and that's a specialized field that basically has nothing to do with the web. And it isn't what you're talking about. > in this case, i'd prefer to be proven wrong with code, rather than prose. What absurdity. And this is exactly when interviews suck. Because people have strongly held beliefs that are ungrounded in reality, and since there are no objective measures by which to rate interviews you need to pretend that they're real, because a lot of interviewers are basically just testing "cultural fit". But hey! I have to say. That if you brought this up in an interview. I would at least know to never take the job!
- leeoniya 4y ago