Skip to content
This repository was archived by the owner on May 5, 2019. It is now read-only.

Commit db68db8

Browse files
committed
Fix inference for rowhash()
The fact that the type of the columns isn't known at compile time appears to confuse inference, which isn't able to detect that this function always returns UInt. This reduces a lot the number of allocations when calling join(), but doesn't really change performance.
1 parent 31e2264 commit db68db8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datatablerow/datatablerow.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ end
5252

5353
# hash of DataTable rows based on its values
5454
# so that duplicate rows would have the same hash
55-
function rowhash(dt::DataTable, r::Int, h::UInt = zero(UInt))
55+
function rowhash(dt::DataTable, r::Int, h::UInt = zero(UInt))::UInt
5656
@inbounds for col in columns(dt)
5757
h = hash_colel(col, r, h)
5858
end

0 commit comments

Comments
 (0)