I recently noticed that my code runs significantly slower since I'm using things like .forEach
instead of normal for loops etc.
I know there are a lot of tools that can for instance minify the source code to reduce file size and tools that simply transpile a newer ECMA Script version to an older one.
But I don't think that's what I'm looking for.
I don't really care too much about the file size. Better run-time performance is much more important to me.
Is there a tool like babel that supports this kind of code optimization? For instance optimizing:
values.forEach(add);
to
length = values.length;
for (i = 0; i < length; i++) {
add.call(context, values[i], i, values);
}