Skip to content

Info request: performance of == vs map(==) #979

Open
@alhirzel

Description

@alhirzel

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions