by mrb · 16y ago · 0 comments
var net = require('net');
var server = net.createServer(function (stream) {
stream.on('connect', function () {});
stream.on('data', function (data) {
stream.write('HTTP/1.0 200 OK\r\nConnection: Keep-Alive\r\nContent-Type: text/html\r\nContent-Length: 13\r\n\r\nHello World\r\n');
});
stream.on('end', function () {stream.end();});
});
server.listen(8124, 'localhost');We are getting closer to open sourcing SXELua :-) It would be great if we could think up a better benchmark then the "Hello World" benchmark :-) What do you think about the suggestion described higher up in this thread?
I think the ideal is a bunch of little synthetic benchmarks, similar to the Hello World, plus a handful of real-world examples like the one checking a password. You want something that stresses the CPU / RAM (not network), since that's where the interesting differences are between these scripting environments.