Skip to content

Instantly share code, notes, and snippets.

@derek
Created July 2, 2013 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derek/5912304 to your computer and use it in GitHub Desktop.
Save derek/5912304 to your computer and use it in GitHub Desktop.
// Obfuscated
function (t) {
var r1365158103887,
s1365158103887,
m1365158103887 = this,
f1365158103887 = m1365158103887.fn,
i1365158103887 = m1365158103887.count,
n1365158103887 = t1365158103887.ns; // no operation performed
s1365158103887 = n1365158103887.now();
while (i1365158103887--) {
var model = new Y.Model();
}
r1365158103887 = (n1365158103887.now() - s1365158103887) / 1e3; // no operation performed
return {
elapsed: r1365158103887,
uid: "uid1365158103887"
}
}
// Non-obfuscated
function (t) {
var elapsedTime,
startTime,
bench = this,
f = bench.fn,
iterations = bench.count,
timer = nanoTimeApplet.ns;
startTime = timer.now();
while (iterations--) {
var model = new Y.Model();
}
elapsedTime = (timer.now() - startTime) / 1000;
return {
elapsed: elapsedTime,
uid: "uid1365158103887"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment