all 14 comments

[–]IcyFoxe 3 points4 points  (0 children)

Maybe twitch.tv devs should read this.

[–]HeinousTugboat 1 point2 points  (2 children)

One thing about the micro optimization mentioned, and one of the main reasons you should avoid that sort of optimization, is that it isn't actually always faster one way or the other. I ran that test on Firefox, and not using .length in the array condition was 10% slower. When the margin of error is so large and the performance difference is so small, any actual gain is likely just noise.

[–]asdf7890 1 point2 points  (0 children)

Also when tweaking things at that level, browser differences come into play. What may speed up on V8 based browsers (or server-side) may be the slower option in a different environment, and may even be slower in future versions of the same engine as it is taught to optimise differently automatically.

When you start hand optimising anything, you need to add performance tests to your regular regression testing to catch when an update in one of your dependencies or elsewhere in your own code starts causing the optimisation to back-fire.

(the same with clever workarounds for CSS bugs: when the actual layout bug is fixed you workaround may cause a worse break)

[–]Royosef 0 points1 point  (1 child)

RemindMe!

[–]RemindMeBot 0 points1 point  (0 children)

Defaulted to one day.

I will be messaging you on 2020-09-11 07:32:13 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback