Skip to content

Performance regression: iterating Tuples of Functions allocates #56607

@MarcMush

Description

@MarcMush
using BenchmarkTools
op = (+,-,*,/,\)
f() = [1 for _=op, _=op]
@btime f()

1.10.6: 575.956 ns (1 allocation: 256 bytes)
1.11.1: 11.000 μs (119 allocations: 3.23 KiB)
1.12.0-DEV.1640: 9.900 μs (119 allocations: 3.23 KiB)

in my testing,

  • op must have at least 5 different functions
  • op has to be iterated at least twice
  • op must be a tuple (not Array)
  • op being global or const has no impact

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions