-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
@stefanpenner been looking at requireInternal in Ember.
Seems like we can get some perf here by preallocating the array http://jsperf.com/preallocating-array/23
var reified = [];
var length = deps.length;
for (var i=0; i<length; i++) {
if (deps[i] === 'exports') {
reified.push(exports);
} else {
reified.push(internalRequire(resolve(deps[i], name), name));
}
}
reified can be preallocated then you don't need to push
Thoughts?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels