Reverting "minor perf. improvements"
Revert "minor perf. improvements"
This reverts commit 24bfd55a22.
broke the parser somehow; too early to optimize, let's get the other stuff running.
This commit is contained in:
13
lib/utils.js
13
lib/utils.js
@@ -46,12 +46,11 @@ function curry(f) {
|
||||
return function() { return f.apply(this, args.concat(slice(arguments))); };
|
||||
};
|
||||
|
||||
function prog1(ret, f1, f2, f3) {
|
||||
function prog1(ret) {
|
||||
if (ret instanceof Function)
|
||||
ret = ret();
|
||||
if (f1) f1();
|
||||
if (f2) f2();
|
||||
if (f3) f3();
|
||||
for (var i = 1, n = arguments.length; --n > 0; ++i)
|
||||
arguments[i]();
|
||||
return ret;
|
||||
};
|
||||
|
||||
@@ -170,9 +169,3 @@ function string_template(text, props) {
|
||||
return props[p];
|
||||
});
|
||||
};
|
||||
|
||||
function time_it(name, cont) {
|
||||
var t1 = new Date().getTime();
|
||||
try { return cont(); }
|
||||
finally { sys.debug("// " + name + ": " + ((new Date().getTime() - t1) / 1000).toFixed(3) + " sec."); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user