top | item 40435888

(no title)

Teckla | 1 year ago

At $WORK we use Mozilla Rhino for some JavaScript processing.

We tested the normal loop vs. the clever loop. Performance-wise, the normal loop blew the doors off the clever loop.

discuss

order

MrJohz|1 year ago

Rhino is a very uncommon engine though. It has its niche, but if you're developing for simpler engines like that, then you typically know that in advance and know what considerations you're going to need to make for that.

When it comes to performance, lessons that apply to Rhino are unlikely to apply to more mainstream engines.

EDIT: That's not to say that everyone should use map and forEach all the time, just that your benchmarks are unlikely to be relevant to most JS devs outside of your specific use-case.