|
|
|
|
|
by ackfoobar
399 days ago
|
|
The example here is basically an 8-fold memory saving going from `long[]` from `byte[]` - while still retaining polymorphism (whereas in Java the two are unrelated types). Hard to say exactly how much performance one would get, as that depends on access patterns. |
|
Of course it depends on your use case, in some cases a compact byte array performs better anyway, for instance because now you're able to fit it in your CPU cache.