Generating random functions (as opposed to random numbers)

That timing means that your computation got constant folded and no work was actually done at runtime. You can do

julia> @btime f($(Ref(2.3))[])
  3.355 ns (0 allocations: 0 bytes)
0.664561538429725

Also hashes can have collisions.

1 Like