Skip to content

Remove ccalls, sync with some changes in stdlib Dict#121

Merged
fingolfin merged 1 commit intoJuliaCollections:masterfrom
fingolfin:mh/sync-with-stdlib
Nov 22, 2024
Merged

Remove ccalls, sync with some changes in stdlib Dict#121
fingolfin merged 1 commit intoJuliaCollections:masterfrom
fingolfin:mh/sync-with-stdlib

Conversation

@fingolfin
Copy link
Copy Markdown
Member

It seems Julia only still provides jl_arrayunset because this package uses it. So let's imitate what Dict in stdlib has been doing since at least Julia 1.6.

There is also no obvious reason why one would ccall jl_array_grow_end instead of just using push! and indeed Dict has been doing this since at least Julia 1.0 (so perhaps this is a holdover from pre-1.0 times?)

The other changes are micro-optimizations, again all based on the code of Dict.

It seems Julia only still provides `jl_arrayunset` because this package
uses it. So let's imitate what Dict in stdlib has been doing since at
least Julia 1.6.

There is also no obvious reason why one would ccall `jl_array_grow_end`
instead of just using `push!` and indeed Dict has been doing this since
at least Julia 1.0 (so perhaps this is a holdover from pre-1.0 times?)

The other changes are micro-optimizations, again all based on the code
of Dict.
@fingolfin fingolfin merged commit 1d3fe18 into JuliaCollections:master Nov 22, 2024
@fingolfin fingolfin deleted the mh/sync-with-stdlib branch November 22, 2024 23:26
@fingolfin fingolfin mentioned this pull request Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants