Skip to content

Commit

Permalink
use better hash
Browse files Browse the repository at this point in the history
  • Loading branch information
crusso committed Feb 16, 2024
1 parent bc41fe4 commit 9431cae
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions collections/motoko/src/ZhenyaHashmap.mo
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import Prim "mo:prim";
actor {
stable let profiling = Profiling.init();

func f_hash(x : Nat64) : Nat32 = Hash.hash(Nat64.toNat x);
let hash : HashMap.HashUtils<Nat64> = (f_hash, Nat64.equal);
let hash : HashMap.HashUtils<Nat64> = Map.n64hash;
stable var map = HashMap.new<Nat64, Nat64>();
let rand = Random.new(null, 42);

Expand Down

0 comments on commit 9431cae

Please sign in to comment.