-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
breakingThis change will break codeThis change will break codeperformanceMust go fasterMust go faster
Milestone
Description
julia> @which hash(1:10)
hash(a::AbstractArray{T,N}) at dict.jl:247The first issue is that this is incredibly slow:
Lines 246 to 252 in 72a65be
| function hash(a::AbstractArray) | |
| h::Uint = hash(size(a))+1 | |
| for i=1:length(a) | |
| h = bitmix(h,int(hash(a[i]))) | |
| end | |
| return h | |
| end |
It's unclear to me why we're using indexing here instead of just iterating, but the code if very old so maybe it made sense at the time.
Metadata
Metadata
Assignees
Labels
breakingThis change will break codeThis change will break codeperformanceMust go fasterMust go faster