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

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

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

fingolfin
Copy link
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
1 check passed
@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