Skip to content

Instantly share code, notes, and snippets.

@dsernst
Last active September 5, 2015 03:46
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 dsernst/0e1f68a00661878ee6b4 to your computer and use it in GitHub Desktop.
Save dsernst/0e1f68a00661878ee6b4 to your computer and use it in GitHub Desktop.
Speed testing node's default console.log, versus an async logger, versus no logging.

Tested with the looping going up to n <= 65

node-simplelogger: 12.2s (with slight delay after it finished printing before the process ended)
no logging: 10.6s
console.log: 12.8s

These measurements came from adjust line 33 of this file: https://github.com/dsernst/ProjectEuler/blob/67a9c17f0810ff6a5da5c20c027e8c11c7a0c304/53%20Combinatoric%20selections.js#L33

The point of these tests were to see if using an asyncronous logger would be faster than node's built in console. In this case, it did not make a meaningful difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment