From 3513f44ba3c9508aa6012cd83604cd47c12ded1d Mon Sep 17 00:00:00 2001 From: KristofferC Date: Fri, 25 Feb 2022 10:15:53 +0100 Subject: [PATCH] return immidiately from `ht_keyindex` if dictionary is empty --- base/dict.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/base/dict.jl b/base/dict.jl index dabdfa5c34773..53f760999482f 100644 --- a/base/dict.jl +++ b/base/dict.jl @@ -278,6 +278,7 @@ end # get the index where a key is stored, or -1 if not present function ht_keyindex(h::Dict{K,V}, key) where V where K + isempty(h) && return -1 sz = length(h.keys) iter = 0 maxprobe = h.maxprobe