-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]good first issueIndicates a good issue for first-time contributors to JuliaIndicates a good issue for first-time contributors to JuliaperformanceMust go fasterMust go fasterregression 1.11Regression in the 1.11 releaseRegression in the 1.11 release
Description
#56029 fixed allocations when inserting at the beginning of a vector even when there was capacity.
However, the fix only works with "large" vectors. With small ones (5 or less in my tests), it allocates even if there's capacity (and the capacity is not affected either)
Reproducible on julia 1.11.5 & 1.12beta3 & master
const x=Vector{Int}(undef, 5);
empty!(x)
@time insert!(x, 1, 10)
0.000001 seconds (1 allocation: 96 bytes)
Metadata
Metadata
Assignees
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]good first issueIndicates a good issue for first-time contributors to JuliaIndicates a good issue for first-time contributors to JuliaperformanceMust go fasterMust go fasterregression 1.11Regression in the 1.11 releaseRegression in the 1.11 release