benchmark: use strict mode

Apply strict mode to benchmark code.

PR-URL: https://github.com/nodejs/node/pull/5336
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
diff --git a/benchmark/arrays/var-int.js b/benchmark/arrays/var-int.js
index 47a7e62..4f9010a 100644
--- a/benchmark/arrays/var-int.js
+++ b/benchmark/arrays/var-int.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var bench = common.createBenchmark(main, {
   type: 'Array Buffer Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' '),
diff --git a/benchmark/arrays/zero-float.js b/benchmark/arrays/zero-float.js
index a662420..0186394 100644
--- a/benchmark/arrays/zero-float.js
+++ b/benchmark/arrays/zero-float.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var bench = common.createBenchmark(main, {
   type: 'Array Buffer Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' '),
diff --git a/benchmark/arrays/zero-int.js b/benchmark/arrays/zero-int.js
index 29a2d58..3b1b0ab 100644
--- a/benchmark/arrays/zero-int.js
+++ b/benchmark/arrays/zero-int.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var bench = common.createBenchmark(main, {
   type: 'Array Buffer Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' '),
diff --git a/benchmark/buffers/buffer-base64-decode.js b/benchmark/buffers/buffer-base64-decode.js
index 76850c1..0b318f2 100644
--- a/benchmark/buffers/buffer-base64-decode.js
+++ b/benchmark/buffers/buffer-base64-decode.js
@@ -1,3 +1,4 @@
+'use strict';
 var assert = require('assert');
 var common = require('../common.js');
 
diff --git a/benchmark/buffers/buffer-base64-encode.js b/benchmark/buffers/buffer-base64-encode.js
index cb520be..6817123 100644
--- a/benchmark/buffers/buffer-base64-encode.js
+++ b/benchmark/buffers/buffer-base64-encode.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 
 var bench = common.createBenchmark(main, {});
diff --git a/benchmark/buffers/buffer-bytelength.js b/benchmark/buffers/buffer-bytelength.js
index 6a7afe6..c40c789 100644
--- a/benchmark/buffers/buffer-bytelength.js
+++ b/benchmark/buffers/buffer-bytelength.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common');
 
 var bench = common.createBenchmark(main, {
diff --git a/benchmark/buffers/buffer-compare.js b/benchmark/buffers/buffer-compare.js
index b02e8a7..c83bb67 100644
--- a/benchmark/buffers/buffer-compare.js
+++ b/benchmark/buffers/buffer-compare.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 
 var bench = common.createBenchmark(main, {
diff --git a/benchmark/buffers/buffer-creation.js b/benchmark/buffers/buffer-creation.js
index bc0c557..6f4b2c9 100644
--- a/benchmark/buffers/buffer-creation.js
+++ b/benchmark/buffers/buffer-creation.js
@@ -1,4 +1,5 @@
-SlowBuffer = require('buffer').SlowBuffer;
+'use strict';
+const SlowBuffer = require('buffer').SlowBuffer;
 
 var common = require('../common.js');
 var bench = common.createBenchmark(main, {
diff --git a/benchmark/buffers/buffer-indexof.js b/benchmark/buffers/buffer-indexof.js
index c575f54..7ae2669 100644
--- a/benchmark/buffers/buffer-indexof.js
+++ b/benchmark/buffers/buffer-indexof.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var fs = require('fs');
 
diff --git a/benchmark/buffers/buffer-iterate.js b/benchmark/buffers/buffer-iterate.js
index 77a0b59..fb8abc1 100644
--- a/benchmark/buffers/buffer-iterate.js
+++ b/benchmark/buffers/buffer-iterate.js
@@ -1,3 +1,4 @@
+'use strict';
 var SlowBuffer = require('buffer').SlowBuffer;
 var common = require('../common.js');
 var assert = require('assert');
diff --git a/benchmark/buffers/buffer-read.js b/benchmark/buffers/buffer-read.js
index 92138bc..e50de84 100644
--- a/benchmark/buffers/buffer-read.js
+++ b/benchmark/buffers/buffer-read.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 
 var bench = common.createBenchmark(main, {
diff --git a/benchmark/buffers/buffer-slice.js b/benchmark/buffers/buffer-slice.js
index f632fa6..70cf3a7 100644
--- a/benchmark/buffers/buffer-slice.js
+++ b/benchmark/buffers/buffer-slice.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var SlowBuffer = require('buffer').SlowBuffer;
 
diff --git a/benchmark/buffers/buffer-write.js b/benchmark/buffers/buffer-write.js
index 2a2a0e3..2238331 100644
--- a/benchmark/buffers/buffer-write.js
+++ b/benchmark/buffers/buffer-write.js
@@ -1,4 +1,4 @@
-
+'use strict';
 var common = require('../common.js');
 var bench = common.createBenchmark(main, {
   noAssert: [false, true],
diff --git a/benchmark/buffers/dataview-set.js b/benchmark/buffers/dataview-set.js
index ce0064e..ab9c1d1 100644
--- a/benchmark/buffers/dataview-set.js
+++ b/benchmark/buffers/dataview-set.js
@@ -1,4 +1,4 @@
-
+'use strict';
 var common = require('../common.js');
 var bench = common.createBenchmark(main, {
   type: ['Uint8', 'Uint16LE', 'Uint16BE',
diff --git a/benchmark/common.js b/benchmark/common.js
index c0c7805..6878d41 100644
--- a/benchmark/common.js
+++ b/benchmark/common.js
@@ -1,3 +1,4 @@
+'use strict';
 var assert = require('assert');
 var fs = require('fs');
 var path = require('path');
diff --git a/benchmark/compare.js b/benchmark/compare.js
index edb116d..fb27d62 100644
--- a/benchmark/compare.js
+++ b/benchmark/compare.js
@@ -1,3 +1,4 @@
+'use strict';
 var usage = 'node benchmark/compare.js ' +
             '<node-binary1> <node-binary2> ' +
             '[--html] [--red|-r] [--green|-g] ' +
@@ -38,9 +39,9 @@
 
 if (!html) {
   var start = '';
-  var green = '\033[1;32m';
-  var red = '\033[1;31m';
-  var reset = '\033[m';
+  var green = '\u001b[1;32m';
+  var red = '\u001b[1;31m';
+  var reset = '\u001b[m';
   var end = '';
 } else {
   var start = '<pre style="background-color:#333;color:#eee">';
diff --git a/benchmark/crypto/aes-gcm-throughput.js b/benchmark/crypto/aes-gcm-throughput.js
index 65e1713..8d4eba5 100644
--- a/benchmark/crypto/aes-gcm-throughput.js
+++ b/benchmark/crypto/aes-gcm-throughput.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var crypto = require('crypto');
 var keylen = {'aes-128-gcm': 16, 'aes-192-gcm': 24, 'aes-256-gcm': 32};
diff --git a/benchmark/crypto/cipher-stream.js b/benchmark/crypto/cipher-stream.js
index 4e81989..df1ae8d 100644
--- a/benchmark/crypto/cipher-stream.js
+++ b/benchmark/crypto/cipher-stream.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 
 var bench = common.createBenchmark(main, {
diff --git a/benchmark/crypto/hash-stream-creation.js b/benchmark/crypto/hash-stream-creation.js
index a14aa22..31b6706 100644
--- a/benchmark/crypto/hash-stream-creation.js
+++ b/benchmark/crypto/hash-stream-creation.js
@@ -1,5 +1,6 @@
 // throughput benchmark
 // creates a single hasher, then pushes a bunch of data through it
+'use strict';
 var common = require('../common.js');
 var crypto = require('crypto');
 
diff --git a/benchmark/crypto/hash-stream-throughput.js b/benchmark/crypto/hash-stream-throughput.js
index 2e987f0..2a17ce5 100644
--- a/benchmark/crypto/hash-stream-throughput.js
+++ b/benchmark/crypto/hash-stream-throughput.js
@@ -1,5 +1,6 @@
 // throughput benchmark
 // creates a single hasher, then pushes a bunch of data through it
+'use strict';
 var common = require('../common.js');
 var crypto = require('crypto');
 
diff --git a/benchmark/crypto/rsa-encrypt-decrypt-throughput.js b/benchmark/crypto/rsa-encrypt-decrypt-throughput.js
index 1cd7a5e..86d3de4 100644
--- a/benchmark/crypto/rsa-encrypt-decrypt-throughput.js
+++ b/benchmark/crypto/rsa-encrypt-decrypt-throughput.js
@@ -1,3 +1,4 @@
+'use strict';
 // throughput benchmark in signing and verifying
 var common = require('../common.js');
 var crypto = require('crypto');
diff --git a/benchmark/crypto/rsa-sign-verify-throughput.js b/benchmark/crypto/rsa-sign-verify-throughput.js
index fd42604..200e573 100644
--- a/benchmark/crypto/rsa-sign-verify-throughput.js
+++ b/benchmark/crypto/rsa-sign-verify-throughput.js
@@ -1,3 +1,4 @@
+'use strict';
 // throughput benchmark in signing and verifying
 var common = require('../common.js');
 var crypto = require('crypto');
diff --git a/benchmark/events/ee-add-remove.js b/benchmark/events/ee-add-remove.js
index cd9fe3c..1d8f2a8 100644
--- a/benchmark/events/ee-add-remove.js
+++ b/benchmark/events/ee-add-remove.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var events = require('events');
 
diff --git a/benchmark/events/ee-emit-multi-args.js b/benchmark/events/ee-emit-multi-args.js
index 78a892d..7416915 100644
--- a/benchmark/events/ee-emit-multi-args.js
+++ b/benchmark/events/ee-emit-multi-args.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var EventEmitter = require('events').EventEmitter;
 
diff --git a/benchmark/events/ee-emit.js b/benchmark/events/ee-emit.js
index 4c45bd9..8777222 100644
--- a/benchmark/events/ee-emit.js
+++ b/benchmark/events/ee-emit.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var EventEmitter = require('events').EventEmitter;
 
diff --git a/benchmark/events/ee-listener-count-on-prototype.js b/benchmark/events/ee-listener-count-on-prototype.js
index 8d536ed..9fb060a 100644
--- a/benchmark/events/ee-listener-count-on-prototype.js
+++ b/benchmark/events/ee-listener-count-on-prototype.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var EventEmitter = require('events').EventEmitter;
 
diff --git a/benchmark/events/ee-listeners-many.js b/benchmark/events/ee-listeners-many.js
index 32721b3..6ea8382 100644
--- a/benchmark/events/ee-listeners-many.js
+++ b/benchmark/events/ee-listeners-many.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var EventEmitter = require('events').EventEmitter;
 
diff --git a/benchmark/events/ee-listeners.js b/benchmark/events/ee-listeners.js
index 68339bc..05b4006 100644
--- a/benchmark/events/ee-listeners.js
+++ b/benchmark/events/ee-listeners.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var EventEmitter = require('events').EventEmitter;
 
diff --git a/benchmark/fs-write-stream-throughput.js b/benchmark/fs-write-stream-throughput.js
index b131d5b..a251af5 100644
--- a/benchmark/fs-write-stream-throughput.js
+++ b/benchmark/fs-write-stream-throughput.js
@@ -1,5 +1,5 @@
-
 // If there are no args, then this is the root.  Run all the benchmarks!
+'use strict';
 if (!process.argv[2])
   parent();
 else
diff --git a/benchmark/fs/read-stream-throughput.js b/benchmark/fs/read-stream-throughput.js
index a181a2d..6b6a392 100644
--- a/benchmark/fs/read-stream-throughput.js
+++ b/benchmark/fs/read-stream-throughput.js
@@ -1,4 +1,5 @@
 // test the throughput of the fs.WriteStream class.
+'use strict';
 
 var path = require('path');
 var common = require('../common.js');
diff --git a/benchmark/fs/readfile.js b/benchmark/fs/readfile.js
index ac32419..0f39f64 100644
--- a/benchmark/fs/readfile.js
+++ b/benchmark/fs/readfile.js
@@ -1,6 +1,7 @@
 // Call fs.readFile over and over again really fast.
 // Then see how many times it got called.
 // Yes, this is a silly benchmark.  Most benchmarks are silly.
+'use strict';
 
 var path = require('path');
 var common = require('../common.js');
diff --git a/benchmark/fs/write-stream-throughput.js b/benchmark/fs/write-stream-throughput.js
index 9ff5838..a3eef67 100644
--- a/benchmark/fs/write-stream-throughput.js
+++ b/benchmark/fs/write-stream-throughput.js
@@ -1,4 +1,5 @@
 // test the throughput of the fs.WriteStream class.
+'use strict';
 
 var path = require('path');
 var common = require('../common.js');
diff --git a/benchmark/http/chunked.js b/benchmark/http/chunked.js
index 0589ff3..9743bc1 100644
--- a/benchmark/http/chunked.js
+++ b/benchmark/http/chunked.js
@@ -6,6 +6,7 @@
 // always as hot as it could be.
 //
 // Verify that our assumptions are valid.
+'use strict';
 
 var common = require('../common.js');
 var PORT = common.PORT;
@@ -17,7 +18,7 @@
 });
 
 function main(conf) {
-  http = require('http');
+  const http = require('http');
   var chunk = new Buffer(conf.size);
   chunk.fill('8');
 
diff --git a/benchmark/http/client-request-body.js b/benchmark/http/client-request-body.js
index 1c27dea..befa381 100644
--- a/benchmark/http/client-request-body.js
+++ b/benchmark/http/client-request-body.js
@@ -1,4 +1,5 @@
 // Measure the time it takes for the HTTP client to send a request body.
+'use strict';
 
 var common = require('../common.js');
 var http = require('http');
diff --git a/benchmark/http/cluster.js b/benchmark/http/cluster.js
index 6391704..9934883 100644
--- a/benchmark/http/cluster.js
+++ b/benchmark/http/cluster.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var PORT = common.PORT;
 
diff --git a/benchmark/http/end-vs-write-end.js b/benchmark/http/end-vs-write-end.js
index c17e2ff..d6b3ebe 100644
--- a/benchmark/http/end-vs-write-end.js
+++ b/benchmark/http/end-vs-write-end.js
@@ -6,6 +6,7 @@
 // always as hot as it could be.
 //
 // Verify that our assumptions are valid.
+'use strict';
 
 var common = require('../common.js');
 var PORT = common.PORT;
@@ -18,7 +19,7 @@
 });
 
 function main(conf) {
-  http = require('http');
+  const http = require('http');
   var chunk;
   var len = conf.kb * 1024;
   switch (conf.type) {
@@ -27,7 +28,6 @@
       chunk.fill('x');
       break;
     case 'utf':
-      encoding = 'utf8';
       chunk = new Array(len / 2 + 1).join('ü');
       break;
     case 'asc':
diff --git a/benchmark/http/simple.js b/benchmark/http/simple.js
index 5bff928..835fa3d 100644
--- a/benchmark/http/simple.js
+++ b/benchmark/http/simple.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var PORT = common.PORT;
 
diff --git a/benchmark/http_bench.js b/benchmark/http_bench.js
index a8f99e2..4d21415 100644
--- a/benchmark/http_bench.js
+++ b/benchmark/http_bench.js
@@ -1,3 +1,4 @@
+'use strict';
 var spawn = require('child_process').spawn;
 var cluster = require('cluster');
 var http = require('http');
diff --git a/benchmark/http_server_lag.js b/benchmark/http_server_lag.js
index ca923d5..bc1825b 100644
--- a/benchmark/http_server_lag.js
+++ b/benchmark/http_server_lag.js
@@ -1,3 +1,5 @@
+'use strict';
+
 var http = require('http');
 var port = parseInt(process.env.PORT, 10) || 8000;
 var defaultLag = parseInt(process.argv[2], 10) || 100;
diff --git a/benchmark/http_simple.js b/benchmark/http_simple.js
index 36800f2..df0505b 100644
--- a/benchmark/http_simple.js
+++ b/benchmark/http_simple.js
@@ -1,3 +1,5 @@
+'use strict';
+
 var path = require('path'),
     exec = require('child_process').exec,
     http = require('http');
diff --git a/benchmark/http_simple_auto.js b/benchmark/http_simple_auto.js
index f72cc01..9d16593 100644
--- a/benchmark/http_simple_auto.js
+++ b/benchmark/http_simple_auto.js
@@ -6,6 +6,7 @@
 //   <args>   Arguments to pass to `ab`.
 //   <target> Target to benchmark, e.g. `bytes/1024` or `buffer/8192`.
 //
+'use strict';
 
 var path = require("path");
 var http = require("http");
diff --git a/benchmark/http_simple_cluster.js b/benchmark/http_simple_cluster.js
index 9a886f2..c2c792c 100644
--- a/benchmark/http_simple_cluster.js
+++ b/benchmark/http_simple_cluster.js
@@ -1,3 +1,4 @@
+'use strict';
 var cluster = require('cluster');
 var os = require('os');
 
diff --git a/benchmark/idle_clients.js b/benchmark/idle_clients.js
index da96b8a..704ed2e 100644
--- a/benchmark/idle_clients.js
+++ b/benchmark/idle_clients.js
@@ -1,4 +1,5 @@
-net = require('net');
+'use strict';
+const net = require('net');
 
 var errors = 0, connections = 0;
 
diff --git a/benchmark/misc/child-process-read.js b/benchmark/misc/child-process-read.js
index 894dd55..c1a7474 100644
--- a/benchmark/misc/child-process-read.js
+++ b/benchmark/misc/child-process-read.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var bench = common.createBenchmark(main, {
   len: [64, 256, 1024, 4096, 32768],
diff --git a/benchmark/misc/domain-fn-args.js b/benchmark/misc/domain-fn-args.js
index 36e9e90..517ca92 100644
--- a/benchmark/misc/domain-fn-args.js
+++ b/benchmark/misc/domain-fn-args.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var domain = require('domain');
 
@@ -12,13 +13,13 @@
 function main(conf) {
 
   var args, ret, n = +conf.n;
-  var arguments = gargs.slice(0, conf.arguments);
+  var myArguments = gargs.slice(0, conf.arguments);
   bench.start();
 
   bdomain.enter();
   for (var i = 0; i < n; i++) {
-    if (arguments.length >= 2) {
-      args = Array.prototype.slice.call(arguments, 1);
+    if (myArguments.length >= 2) {
+      args = Array.prototype.slice.call(myArguments, 1);
       ret = fn.apply(this, args);
     } else {
       ret = fn.call(this);
diff --git a/benchmark/misc/function_call/index.js b/benchmark/misc/function_call/index.js
index fc8542a..e2e01b1 100644
--- a/benchmark/misc/function_call/index.js
+++ b/benchmark/misc/function_call/index.js
@@ -2,6 +2,7 @@
 // relative to a comparable C++ function.
 // Reports millions of calls per second.
 // Note that JS speed goes up, while cxx speed stays about the same.
+'use strict';
 
 var assert = require('assert');
 var common = require('../../common.js');
diff --git a/benchmark/misc/module-loader.js b/benchmark/misc/module-loader.js
index e53bc4d..1794860 100644
--- a/benchmark/misc/module-loader.js
+++ b/benchmark/misc/module-loader.js
@@ -1,3 +1,4 @@
+'use strict';
 var fs = require('fs');
 var path = require('path');
 var common = require('../common.js');
diff --git a/benchmark/misc/next-tick-breadth.js b/benchmark/misc/next-tick-breadth.js
index 6524081..87d130f 100644
--- a/benchmark/misc/next-tick-breadth.js
+++ b/benchmark/misc/next-tick-breadth.js
@@ -1,3 +1,4 @@
+'use strict';
 
 var common = require('../common.js');
 var bench = common.createBenchmark(main, {
diff --git a/benchmark/misc/next-tick-depth.js b/benchmark/misc/next-tick-depth.js
index 8a2c8e0..bc513d3 100644
--- a/benchmark/misc/next-tick-depth.js
+++ b/benchmark/misc/next-tick-depth.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var bench = common.createBenchmark(main, {
   millions: [2]
diff --git a/benchmark/misc/spawn-echo.js b/benchmark/misc/spawn-echo.js
index 2b1b989..7c9e851 100644
--- a/benchmark/misc/spawn-echo.js
+++ b/benchmark/misc/spawn-echo.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var bench = common.createBenchmark(main, {
   thousands: [1]
diff --git a/benchmark/misc/startup.js b/benchmark/misc/startup.js
index aa5b442..f457779 100644
--- a/benchmark/misc/startup.js
+++ b/benchmark/misc/startup.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var spawn = require('child_process').spawn;
 var path = require('path');
diff --git a/benchmark/misc/string-creation.js b/benchmark/misc/string-creation.js
index 74dabd6..74dea02 100644
--- a/benchmark/misc/string-creation.js
+++ b/benchmark/misc/string-creation.js
@@ -1,3 +1,4 @@
+'use strict';
 
 var common = require('../common.js');
 var bench = common.createBenchmark(main, {
diff --git a/benchmark/misc/string-decoder.js b/benchmark/misc/string-decoder.js
index 14563ce..e45016b 100644
--- a/benchmark/misc/string-decoder.js
+++ b/benchmark/misc/string-decoder.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var StringDecoder = require('string_decoder').StringDecoder;
 
diff --git a/benchmark/misc/timers.js b/benchmark/misc/timers.js
index 23f571b..13b18ff 100644
--- a/benchmark/misc/timers.js
+++ b/benchmark/misc/timers.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 
 var bench = common.createBenchmark(main, {
diff --git a/benchmark/misc/url.js b/benchmark/misc/url.js
index 6c2799b..78fe7b6 100644
--- a/benchmark/misc/url.js
+++ b/benchmark/misc/url.js
@@ -1,3 +1,4 @@
+'use strict';
 var url = require('url')
 var n = 25 * 100;
 
diff --git a/benchmark/misc/v8-bench.js b/benchmark/misc/v8-bench.js
index 0eb95aa..606170a 100644
--- a/benchmark/misc/v8-bench.js
+++ b/benchmark/misc/v8-bench.js
@@ -1,4 +1,5 @@
 // compare with "google-chrome deps/v8/benchmarks/run.html"
+'use strict';
 var fs = require('fs');
 var path = require('path');
 var vm = require('vm');
diff --git a/benchmark/net/net-c2s-cork.js b/benchmark/net/net-c2s-cork.js
index 5f8e0fa..4ca5371 100644
--- a/benchmark/net/net-c2s-cork.js
+++ b/benchmark/net/net-c2s-cork.js
@@ -1,4 +1,5 @@
 // test the speed of .pipe() with sockets
+'use strict';
 
 var common = require('../common.js');
 var PORT = common.PORT;
diff --git a/benchmark/net/net-c2s.js b/benchmark/net/net-c2s.js
index 49de7c7..bbfbd88 100644
--- a/benchmark/net/net-c2s.js
+++ b/benchmark/net/net-c2s.js
@@ -1,4 +1,5 @@
 // test the speed of .pipe() with sockets
+'use strict';
 
 var common = require('../common.js');
 var PORT = common.PORT;
diff --git a/benchmark/net/net-pipe.js b/benchmark/net/net-pipe.js
index 2a5ed8e..d12a45f 100644
--- a/benchmark/net/net-pipe.js
+++ b/benchmark/net/net-pipe.js
@@ -1,4 +1,5 @@
 // test the speed of .pipe() with sockets
+'use strict';
 
 var common = require('../common.js');
 var PORT = common.PORT;
diff --git a/benchmark/net/net-s2c.js b/benchmark/net/net-s2c.js
index 79e2249..4dc8462 100644
--- a/benchmark/net/net-s2c.js
+++ b/benchmark/net/net-s2c.js
@@ -1,4 +1,5 @@
 // test the speed of .pipe() with sockets
+'use strict';
 
 var common = require('../common.js');
 var PORT = common.PORT;
diff --git a/benchmark/net/tcp-raw-c2s.js b/benchmark/net/tcp-raw-c2s.js
index 0039313..25efc78 100644
--- a/benchmark/net/tcp-raw-c2s.js
+++ b/benchmark/net/tcp-raw-c2s.js
@@ -1,5 +1,6 @@
 // In this benchmark, we connect a client to the server, and write
 // as many bytes as we can in the specified time (default = 10s)
+'use strict';
 
 var common = require('../common.js');
 var util = require('util');
diff --git a/benchmark/net/tcp-raw-pipe.js b/benchmark/net/tcp-raw-pipe.js
index 1504d11..e22437f 100644
--- a/benchmark/net/tcp-raw-pipe.js
+++ b/benchmark/net/tcp-raw-pipe.js
@@ -1,5 +1,6 @@
 // In this benchmark, we connect a client to the server, and write
 // as many bytes as we can in the specified time (default = 10s)
+'use strict';
 
 var common = require('../common.js');
 var util = require('util');
diff --git a/benchmark/net/tcp-raw-s2c.js b/benchmark/net/tcp-raw-s2c.js
index 502586c..15f9578 100644
--- a/benchmark/net/tcp-raw-s2c.js
+++ b/benchmark/net/tcp-raw-s2c.js
@@ -1,5 +1,6 @@
 // In this benchmark, we connect a client to the server, and write
 // as many bytes as we can in the specified time (default = 10s)
+'use strict';
 
 var common = require('../common.js');
 var util = require('util');
diff --git a/benchmark/path/basename-posix.js b/benchmark/path/basename-posix.js
index d4ea072..64da901 100644
--- a/benchmark/path/basename-posix.js
+++ b/benchmark/path/basename-posix.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/basename-win32.js b/benchmark/path/basename-win32.js
index 08938a2..b8e2186 100644
--- a/benchmark/path/basename-win32.js
+++ b/benchmark/path/basename-win32.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/dirname-posix.js b/benchmark/path/dirname-posix.js
index 037ac63..e7ea80f 100644
--- a/benchmark/path/dirname-posix.js
+++ b/benchmark/path/dirname-posix.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/dirname-win32.js b/benchmark/path/dirname-win32.js
index cd8c190..5cb0829 100644
--- a/benchmark/path/dirname-win32.js
+++ b/benchmark/path/dirname-win32.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/extname-posix.js b/benchmark/path/extname-posix.js
index 41a4a77..61a1073 100644
--- a/benchmark/path/extname-posix.js
+++ b/benchmark/path/extname-posix.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/extname-win32.js b/benchmark/path/extname-win32.js
index fcc1af9..67e53ea 100644
--- a/benchmark/path/extname-win32.js
+++ b/benchmark/path/extname-win32.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/format-posix.js b/benchmark/path/format-posix.js
index 6dce6d3..b30b58b 100644
--- a/benchmark/path/format-posix.js
+++ b/benchmark/path/format-posix.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/format-win32.js b/benchmark/path/format-win32.js
index 598393b..7404f2e 100644
--- a/benchmark/path/format-win32.js
+++ b/benchmark/path/format-win32.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/isAbsolute-posix.js b/benchmark/path/isAbsolute-posix.js
index 4f8d89e..fb8956c 100644
--- a/benchmark/path/isAbsolute-posix.js
+++ b/benchmark/path/isAbsolute-posix.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/isAbsolute-win32.js b/benchmark/path/isAbsolute-win32.js
index c6771a0..57fb8b8 100644
--- a/benchmark/path/isAbsolute-win32.js
+++ b/benchmark/path/isAbsolute-win32.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/join-posix.js b/benchmark/path/join-posix.js
index 4b8bb92..1222f40 100644
--- a/benchmark/path/join-posix.js
+++ b/benchmark/path/join-posix.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/join-win32.js b/benchmark/path/join-win32.js
index 7309d1f..8680185 100644
--- a/benchmark/path/join-win32.js
+++ b/benchmark/path/join-win32.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/makeLong-win32.js b/benchmark/path/makeLong-win32.js
index c0b0ac1..d4b29d7 100644
--- a/benchmark/path/makeLong-win32.js
+++ b/benchmark/path/makeLong-win32.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/normalize-posix.js b/benchmark/path/normalize-posix.js
index 87cf903..19d6461 100644
--- a/benchmark/path/normalize-posix.js
+++ b/benchmark/path/normalize-posix.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/normalize-win32.js b/benchmark/path/normalize-win32.js
index 50f1e75..119f979 100644
--- a/benchmark/path/normalize-win32.js
+++ b/benchmark/path/normalize-win32.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/parse-posix.js b/benchmark/path/parse-posix.js
index 97d84e5..ee4306f 100644
--- a/benchmark/path/parse-posix.js
+++ b/benchmark/path/parse-posix.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/parse-win32.js b/benchmark/path/parse-win32.js
index 7746a10..5a7b80f 100644
--- a/benchmark/path/parse-win32.js
+++ b/benchmark/path/parse-win32.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/relative-posix.js b/benchmark/path/relative-posix.js
index 59058ba..7544fb2 100644
--- a/benchmark/path/relative-posix.js
+++ b/benchmark/path/relative-posix.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/relative-win32.js b/benchmark/path/relative-win32.js
index f3eab74..9253195 100644
--- a/benchmark/path/relative-win32.js
+++ b/benchmark/path/relative-win32.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/resolve-posix.js b/benchmark/path/resolve-posix.js
index 0f0554d..93e5b82 100644
--- a/benchmark/path/resolve-posix.js
+++ b/benchmark/path/resolve-posix.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/path/resolve-win32.js b/benchmark/path/resolve-win32.js
index 8a55022..dc0eb30 100644
--- a/benchmark/path/resolve-win32.js
+++ b/benchmark/path/resolve-win32.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var path = require('path');
 var v8 = require('v8');
diff --git a/benchmark/querystring/querystring-parse.js b/benchmark/querystring/querystring-parse.js
index 6c912c0..581fe7c 100644
--- a/benchmark/querystring/querystring-parse.js
+++ b/benchmark/querystring/querystring-parse.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var querystring = require('querystring');
 var v8 = require('v8');
diff --git a/benchmark/querystring/querystring-stringify.js b/benchmark/querystring/querystring-stringify.js
index a22c3ea..5870a69 100644
--- a/benchmark/querystring/querystring-stringify.js
+++ b/benchmark/querystring/querystring-stringify.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var querystring = require('querystring');
 var v8 = require('v8');
diff --git a/benchmark/report-startup-memory.js b/benchmark/report-startup-memory.js
index 14e5623..6d79630 100644
--- a/benchmark/report-startup-memory.js
+++ b/benchmark/report-startup-memory.js
@@ -1 +1,2 @@
+'use strict';
 console.log(process.memoryUsage().rss);
diff --git a/benchmark/static_http_server.js b/benchmark/static_http_server.js
index b3a8378..3288cae 100644
--- a/benchmark/static_http_server.js
+++ b/benchmark/static_http_server.js
@@ -1,3 +1,4 @@
+'use strict';
 var http = require('http');
 
 var concurrency = 30;
diff --git a/benchmark/tls/throughput.js b/benchmark/tls/throughput.js
index 442eba3..2e1147c 100644
--- a/benchmark/tls/throughput.js
+++ b/benchmark/tls/throughput.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var bench = common.createBenchmark(main, {
   dur: [5],
diff --git a/benchmark/tls/tls-connect.js b/benchmark/tls/tls-connect.js
index 96c9c5a..0dd20e1 100644
--- a/benchmark/tls/tls-connect.js
+++ b/benchmark/tls/tls-connect.js
@@ -1,3 +1,4 @@
+'use strict';
 var assert = require('assert'),
     fs = require('fs'),
     path = require('path'),
diff --git a/benchmark/url/url-parse.js b/benchmark/url/url-parse.js
index ffa47c4..8967954 100644
--- a/benchmark/url/url-parse.js
+++ b/benchmark/url/url-parse.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var url = require('url');
 var v8 = require('v8');
diff --git a/benchmark/url/url-resolve.js b/benchmark/url/url-resolve.js
index 5f6c1f7..18f67e8 100644
--- a/benchmark/url/url-resolve.js
+++ b/benchmark/url/url-resolve.js
@@ -1,3 +1,4 @@
+'use strict';
 var common = require('../common.js');
 var url = require('url');
 var v8 = require('v8');
diff --git a/benchmark/util/inspect.js b/benchmark/util/inspect.js
index 8a59e6b..d8ba243 100644
--- a/benchmark/util/inspect.js
+++ b/benchmark/util/inspect.js
@@ -1,3 +1,4 @@
+'use strict';
 var util = require('util');
 
 var common = require('../common.js');