Open
Description
Recently I discovered that hashing higher-dimensional arrays is faster when flatting them first.
using BenchmarkTools
@benchmark hash($rand(512)) # 8.072 μs
@benchmark hash($rand(8,8,8)) # 26.493 μs
@benchmark hash(vec($rand(8,8,8))) # 8.239 μs
shouldn't arrays of primitive types have optimized methods for hash?
Activity