Created
March 6, 2012 21:15
-
-
Save piscisaureus/1989015 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/benchmark/http_simple.js b/benchmark/http_simple.js | |
index 74ba4d7..48dc5c3 100644 | |
--- a/benchmark/http_simple.js | |
+++ b/benchmark/http_simple.js | |
@@ -26,14 +26,10 @@ var server = http.createServer(function (req, res) { | |
var n = parseInt(arg, 10) | |
if (n <= 0) | |
throw "bytes called with n <= 0" | |
- if (stored[n] === undefined) { | |
- console.log("create stored[n]"); | |
- stored[n] = ""; | |
- for (var i = 0; i < n; i++) { | |
- stored[n] += "C" | |
- } | |
+ body = "12345678"; | |
+ while (body.length < n) { | |
+ body += body; | |
} | |
- body = stored[n]; | |
} else if (command == "buffer") { | |
var n = parseInt(arg, 10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment