Skip to content

Instantly share code, notes, and snippets.

@danielfone
Created August 24, 2015 00:52
Show Gist options
  • Select an option

  • Save danielfone/f3c57589b799f165bf3c to your computer and use it in GitHub Desktop.

Select an option

Save danielfone/f3c57589b799f165bf3c to your computer and use it in GitHub Desktop.
Small Arrays: (80 + 40)
Calculating -------------------------------------
b & a | a 24.860k i/100ms
sort_by 27.909k i/100ms
set 7.622k i/100ms
-------------------------------------------------
b & a | a 339.055k (± 3.3%) i/s - 1.715M
sort_by 393.757k (± 2.9%) i/s - 1.982M
set 84.387k (± 2.1%) i/s - 426.832k
Comparison:
sort_by: 393757.4 i/s
b & a | a: 339054.8 i/s - 1.16x slower
set: 84387.0 i/s - 4.67x slower
Big Arrays: (11636312 + 2298552)
Calculating -------------------------------------
b & a | a 1.000 i/100ms
set 1.000 i/100ms
-------------------------------------------------
b & a | a 0.756 (± 0.0%) i/s - 4.000 in 5.290328s
set 0.472 (± 0.0%) i/s - 3.000 in 6.485751s
Comparison:
b & a | a: 0.8 i/s
set: 0.5 i/s - 1.60x slower
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment