Skip to content

Instantly share code, notes, and snippets.

@LCamel
Created October 20, 2011 13:38
Show Gist options
  • Save LCamel/1301166 to your computer and use it in GitHub Desktop.
Save LCamel/1301166 to your computer and use it in GitHub Desktop.
var http = require("http");
function f() {
var s = Math.random();
for (i = 0; i < 100000; i++)
s += i;
return s;
}
function g() {
var s = Math.random();
for (i = 0; i < 1000000; i++)
s += i;
return s;
}
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("f: " + f());
response.write("####");
response.write("g: " + g());
// f(function() { response.write("a");});
response.end();
}).listen(8888);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment