Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created September 27, 2011 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnoordhuis/c02d4187096a666a09ed to your computer and use it in GitHub Desktop.
Save bnoordhuis/c02d4187096a666a09ed to your computer and use it in GitHub Desktop.
var HTTPParser = process.binding('http_parser').HTTPParser;
var request_v = HTTPParser.REQUEST || 'request';
var response_v = HTTPParser.RESPONSE || 'response';
for (var i = 0; i < 2 * 1000 * 1000; ++i) {
var parser = new HTTPParser(request_v);
}
for (var i = 0; i < 2 * 1000 * 1000; ++i) {
var parser = new HTTPParser(response_v);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment