-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
map
recommendations in deprecation warnings and NEWS harmful?
#10537
Comments
Looks like there is a regression that may explain part (but not all) of the speed gap. On 0.3.6: julia> immutable A; x::Int; end
julia> x = rand(Int, 100000000);
julia> @time map(A, x);
elapsed time: 0.8371671 seconds (800000128 bytes allocated) On master: julia> immutable A; x::Int; end
julia> x = rand(Int, 100000000);
julia> @time map(A, x);
elapsed time: 4.653523433 seconds (3814 MB allocated, 5.85% gc time in 140 pauses with 1 full sweep) It doesn't look like |
Oh drat. This used to work, but removing the type from the first argument to |
Thanks for catching and plugging this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the deprecated lowercase
int
,bool
, etc.Timings (where vector is sized so
map
takes ~1 second):Int -> Bool:
map
20x slower thanVector{Bool}
which is 25% slower thanround
Bool -> Int:
map
20x slower thanVector{Int}
orround
Int8 -> Int:
map
15x slower thanVector{Int}
orround
Int -> Float:
map
10x slower thanVector{Float64}
orfloat
Float64 -> Float32:
map
50x slower thanVector{Float32}
(Aside: I'm also unsure why
Bool(200)
works whenInt8(200)
doesn't, if anyone wants to point me to the right discussion.)The text was updated successfully, but these errors were encountered: