-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
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
Labels
No labels