Faster merging of hyper c arrays.
Faster merging of hyper c arrays.

I tried implementing 3 different approaches to merging the arrays. This was by
far the fastest at (0.01ms to 0.02ms for the union benchmark). It seems
when the ternary operator is inside the inner loop compiler does something that
is fast such as an operation with no branching.

The other approaches were,

* processing a 64-bit integer at a time and unpacking the bytes (0.16ms)
* branching rather than a ternary operator for the max value which is
  similar to the original code (0.10ms to 0.40ms)

Benchmark before,

module       P        card   fill      bytes  insert us   union ms    card ms    json ms
hyper_carray 15          1   0.00      32784       1.80       0.10       0.33       0.21
hyper_carray 15        100   0.00      32784       0.54       0.11       0.34       0.28
hyper_carray 15        500   0.02      32784       0.50       0.10       0.38       0.47
hyper_carray 15       1000   0.03      32784       0.51       0.11       0.38       0.74
hyper_carray 15       2500   0.07      32784       0.50       0.11       0.43       1.41
hyper_carray 15       5000   0.14      32784       0.51       0.12       0.51       2.38
hyper_carray 15      10000   0.26      32784       0.51       0.14       0.65       4.17
hyper_carray 15      15000   0.37      32784       0.51       0.16       0.82       5.32
hyper_carray 15      25000   0.53      32784       0.51       0.20       1.05       6.10
hyper_carray 15      50000   0.78      32784       0.51       0.26       1.31       5.77
hyper_carray 15     100000   0.95      32784       0.51       0.33       1.65       5.18
hyper_carray 15    1000000   1.00      32784       0.53       0.43       1.83       5.23

Benchmark after,

module       P        card   fill      bytes  insert us   union ms    card ms    json ms
hyper_carray 15          1   0.00      32784       2.30       0.02       0.32       0.22
hyper_carray 15        100   0.00      32784       0.53       0.02       0.33       0.22
hyper_carray 15        500   0.02      32784       0.51       0.02       0.35       0.43
hyper_carray 15       1000   0.03      32784       0.50       0.02       0.37       0.68
hyper_carray 15       2500   0.07      32784       0.51       0.02       0.42       1.34
hyper_carray 15       5000   0.14      32784       0.50       0.01       0.50       2.33
hyper_carray 15      10000   0.26      32784       0.52       0.01       0.65       4.10
hyper_carray 15      15000   0.37      32784       0.51       0.02       0.79       5.33
hyper_carray 15      25000   0.53      32784       0.51       0.02       1.01       6.11
hyper_carray 15      50000   0.78      32784       0.51       0.02       1.30       5.77
hyper_carray 15     100000   0.95      32784       0.51       0.02       1.63       5.23
hyper_carray 15    1000000   1.00      32784       0.53       0.02       1.82       5.32

GameAnalytics/hyper,GameAnalytics/hyper