4 ms·
One of the defining thing about MythBusters was that they'd take a myth, build an experiment with at least some notion of control, and then carry it out, so you
by Twirrim 10y ago
One of the defining thing about MythBusters was that they'd take a myth, build an experiment with at least some notion of control, and then carry it out, so you can actually see the results.
Instead this site seems to be "regurgitate myths". e.g. http://mythbusters.js.org/workflow/boolean-conditions.html http://mythbusters.js.org/workflow/boolean-conditions.html
"Avoid using >= and <= unless necessary. It’s faster to use a simpler comparison." There's a trivial code example, and then absolutely no evidence to support the claim. No benchmarks, nothing.
- mintplant 10y agoI'm extremely skeptical of that claim, too. As far as I can tell SpiderMonkey for example will emit practically exactly the same code for >= and <= as other comparisons. In loop optimization SpiderMonkey will actually sometimes rewrite eg. `x < y` as `x + 1 <= y` to put linear inequalities into a standard form for analysis [0]. They also recommend using `let` and `const` over `var` for performance reasons in the "Scope" section, but I have to ask whether they benchmarked that at all. Engines may grow to take advantage of these signals over time for further optimization, but at the moment many ES6 features incur a performance penalty just because the code behind them is less mature. I don't know specifically about `let`/`const` but I'd be pleasantly surprised to learn that they boost performance anywhere yet. [0] https://dxr.mozilla.org/mozilla-central/source/js/src/jit/IonAnalysis.cpp#3061-3120 https://dxr.mozilla.org/mozilla-central/source/js/src/jit/Io...
- deleted 10y ago[deleted]
- choward 10y agoExactly. There are no myths. There is no mythbusting. This has absolutely nothing to do with mythbusters. It's just some random opinions about optimizations you most likely don't need. Who cares if something is barely faster? If the slower way is a lot more readable, I'm opting for that.
- cwmma 10y agoit looks like they have removed that one after I (and others) left comments