diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2014-03-20 09:00:22 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2014-03-20 12:38:00 -0400 |
commit | 9ad6e7e93e62a27e6ef803fbf46623bca732750f (patch) | |
tree | 928a639bb380646ad0729ab582a289ecb6e47a24 /speed/benchmark.js | |
parent | d3c1ce9c243e04f80e2093e20ffe16bbade93985 (diff) | |
download | jquery-9ad6e7e93e62a27e6ef803fbf46623bca732750f.tar.gz jquery-9ad6e7e93e62a27e6ef803fbf46623bca732750f.zip |
Tests: Remove obsolete speed directory
Closes gh-1551
Diffstat (limited to 'speed/benchmark.js')
-rw-r--r-- | speed/benchmark.js | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/speed/benchmark.js b/speed/benchmark.js deleted file mode 100644 index 334abf15d..000000000 --- a/speed/benchmark.js +++ /dev/null @@ -1,15 +0,0 @@ -// Runs a function many times without the function call overhead -function benchmark(fn, times, name){ - fn = fn.toString(); - var s = fn.indexOf('{')+1, - e = fn.lastIndexOf('}'); - fn = fn.substring(s,e); - - return benchmarkString(fn, times, name); -} - -function benchmarkString(fn, times, name) { - var fn = new Function("i", "var t=new Date; while(i--) {" + fn + "}; return new Date - t")(times) - fn.displayName = name || "benchmarked"; - return fn; -} |