I am not sure I quite understand. But it looks like you know how to improve the Jaccard distance code, so why not make a pull request at Distances.jl?
> function myjaccard2(a::Array{Float64,1}, b::Array{Float64,1}) > num = 0 > den = 0 > for i in 1:length(a) > num = num + min(a[i],b[i]) > den = den + max(a[i],b[i]) > end > 1. - num/den > end Initialising num and den as Int gives you a type instability. This should work better (plus a few cosmetic changes): function myjaccard2(a::Array{Float64,1}, b::Array{Float64,1}) num = 0.0 den = 0.0 for i in 1:length(a) num += min(a[i],b[i]) den += max(a[i],b[i]) end return 1. - num/den end