Skip to content

Instantly share code, notes, and snippets.

@benaubin
Created November 17, 2015 00:42
Show Gist options
  • Save benaubin/84aebfdf4f5cbda6260c to your computer and use it in GitHub Desktop.
Save benaubin/84aebfdf4f5cbda6260c to your computer and use it in GitHub Desktop.
For stack overflow question: http://stackoverflow.com/a/33746961/3144928
5000000 times
user system total real
With if, Symbol 1.710000 0.010000 1.720000 ( 1.717787)
With if, Array Size 2 0.730000 0.000000 0.730000 ( 0.733222)
With if, Array Size 3 0.740000 0.000000 0.740000 ( 0.737046)
With if, Array Size 4 0.740000 0.000000 0.740000 ( 0.747544)
With if, Array Size 5 0.740000 0.010000 0.750000 ( 0.746374)
Without if, Symbol 1.500000 0.000000 1.500000 ( 1.514637)
Without if, Array Size 2 0.830000 0.010000 0.840000 ( 0.834003)
Without if, Array Size 3 0.830000 0.000000 0.830000 ( 0.834955)
Without if, Array Size 4 1.880000 0.010000 1.890000 ( 1.884908)
Without if, Array Size 5 1.940000 0.000000 1.940000 ( 1.951689)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment