Hi, Ismael Venegas Castelló <ismael.vc1...@gmail.com> writes: > julia> Base.sum{T<:Real, S<:Real}(::Type{T}, xs::Range{S})::T = sum(xs) > julia> r = 1:100; sum(r), sum(Int32, r)
thanks for this, but as I understand it, for my particular case in which I'm interested in working with 32bits Integers this would be similar to just doing: Int32(sum(1:100)) OK, the result will be of type Int32 but everything in between has been calculated as Int64, right? I wanted to see if there is any difference in speed when doing addition (or any other operations) only with Int32 instructions (assuming I know I won't get overflows). Cheers, -- Ángel de Vicente http://www.iac.es/galeria/angelv/