Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some optimizations for Array{Symbol} #41575

Merged
merged 1 commit into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/summarysize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function (ss::SummarySize)(obj::Array)
dsize += length(obj)
end
size += dsize
if !isempty(obj) && (!Base.allocatedinline(T) || (T isa DataType && !Base.datatype_pointerfree(T)))
if !isempty(obj) && T !== Symbol && (!Base.allocatedinline(T) || (T isa DataType && !Base.datatype_pointerfree(T)))
push!(ss.frontier_x, obj)
push!(ss.frontier_i, 1)
end
Expand Down
2 changes: 2 additions & 0 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2564,6 +2564,8 @@ mark: {
if (a->data == NULL || jl_array_len(a) == 0)
goto pop;
if (flags.ptrarray) {
if (jl_tparam0(vt) == jl_symbol_type)
goto pop;
size_t l = jl_array_len(a);
uintptr_t nptr = (l << 2) | (bits & GC_OLD);
objary_begin = (jl_value_t**)a->data;
Expand Down