JuliaArrays / JuliaArrays/StaticArrays.jl
Info request: performance of == vs map(==)
Open
Nobody has claimed this yet.
compile-time-performance
- Dominant language
- Julia
- Stars
- 844
- Forks
- 159
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Description
Wondering if the following performance is expected?
# _
# _ _ _(_)_ | Documentation: https://docs.julialang.org
# (_) | (_) (_) |
# _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
# | | | | | | |/ _` | |
# | | |_| | | | (_| | | Version 1.6.1 (2021-04-23)
# _/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
#|__/ |
#
julia> using StaticArrays
julia> @time SVector(1:100...) == SVector(1:100...)
0.347808 seconds (749.39 k allocations: 48.644 MiB, 15.53% gc time, 99.78% compilation time)
true
julia> @time map(==, [SVector(1:100...)], [SVector(1:100...)]);
12.972637 seconds (409.54 k allocations: 24.336 MiB, 100.00% compilation time)
Assuming this is expected, wonder if anyone would be willing to shed light on what's happening with map to cause this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two Julia 1.6.1 REPL timings shown in the issue, comparing direct == with map(==) on the SVector inputs. The issue names no source file or test; completion would require explaining whether the compilation and allocation difference is expected and documenting or resolving a confirmed problem.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100