You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
f = (function(a, b) {
function id(s) { return s; }
return function m(c){
let s = 0
for (let i = 0; i < a; i++)
s = s + c + id(b)
return s
}
})(4, 5)
__optimize(f);
Prepack output (with default settings in the REPL):
(function () {
var _$8 = this;
var _1 = function (c) {
var _$0 = 0 + c;
var _$1 = _$0 + 5;
var _$2 = _$1 + c;
var _$3 = _$2 + 5;
var _$4 = _$3 + c;
var _$5 = _$4 + 5;
var _$6 = _$5 + c;
var _$7 = _$6 + 5;
return _$7;
};
_$8.f = _1;
}).call(this);
How can I avoid this many variables being defined?
The text was updated successfully, but these errors were encountered:
akidee
changed the title
No loop unrolling
Avoiding too many variables
Jan 18, 2021
Input:
Prepack output (with default settings in the REPL):
How can I avoid this many variables being defined?
The text was updated successfully, but these errors were encountered: