From 47b4eae9a6b80ec5e9fc247bca1cfbde93b86cd7 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Fri, 2 Dec 2022 10:13:07 -0800 Subject: [PATCH] perf: use ByteArray.hash directly --- Lake/Build/Trace.lean | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lake/Build/Trace.lean b/Lake/Build/Trace.lean index 4b7141e573..41d89c86b5 100644 --- a/Lake/Build/Trace.lean +++ b/Lake/Build/Trace.lean @@ -108,8 +108,8 @@ instance : ToString Hash := ⟨Hash.toString⟩ def ofString (str : String) := mix nil <| mk <| hash str -- same as Name.mkSimple -def ofByteArray (bytes : ByteArray) := - bytes.foldl (init := nil) fun h b => mix h (mk <| hash b) +def ofByteArray (bytes : ByteArray) : Hash := + ⟨hash bytes⟩ end Hash