Skip to content

strange allocation in 1.7.0 (machine dependent) #43362

@lmiq

Description

@lmiq

Followup from: https://discourse.julialang.org/t/where-is-this-one-allocation-coming-from/

Minimal example:

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.0 (2021-11-30)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> U(x, y) = x[1];

julia> a=[1.0]; b=(1.0,);

julia> using BenchmarkTools

julia> @btime U($a, $b)
  13.971 ns (1 allocation: 16 bytes)
1.0

The allocation occurs in one of four different computers I have tested (all running Linux), although all used the same Julia version.

In the computer where the allocation occurs, it does not occur in Julia 1.6.0, which I had installed there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions