-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed as duplicate of#56748
Closed as duplicate of#56748
Copy link
Labels
ciContinuous integrationContinuous integrationduplicateIndicates similar issues or pull requestsIndicates similar issues or pull requests
Description
The test in
julia/Compiler/test/codegen.jl
Lines 390 to 412 in 40fbc88
| # Issue #10208 - Unnecessary boxing for calling objectid | |
| struct FooDictHash{T} | |
| x::T | |
| end | |
| function f_dict_hash_alloc() | |
| d = Dict{FooDictHash{Int},Int}() | |
| for i in 1:10000 | |
| d[FooDictHash(i)] = i+1 | |
| end | |
| d | |
| end | |
| function g_dict_hash_alloc() | |
| d = Dict{Int,Int}() | |
| for i in 1:10000 | |
| d[i] = i+1 | |
| end | |
| d | |
| end | |
| # Warm up | |
| f_dict_hash_alloc(); g_dict_hash_alloc(); | |
| @test abs((@allocated f_dict_hash_alloc()) / (@allocated g_dict_hash_alloc()) - 1) < 0.1 # less that 10% difference |
seems to be a bit flaky. Errored on CI (https://buildkite.com/julialang/julia-release-1-dot-12/builds/10#0194fe6a-8efc-4a90-af48-f19bc8aa1161) with:
julia/Compiler/test/codegen.jl:412 =# @allocated(g_dict_hash_alloc()) - 1) < 0.1
--
| Evaluated: 0.16517549896765304 < 0.1
Metadata
Metadata
Assignees
Labels
ciContinuous integrationContinuous integrationduplicateIndicates similar issues or pull requestsIndicates similar issues or pull requests