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

Reduce compilation of Base methods (NFC) #38

Merged
merged 1 commit into from
Jan 31, 2022
Merged

Reduce compilation of Base methods (NFC) #38

merged 1 commit into from
Jan 31, 2022

Conversation

timholy
Copy link
Member

@timholy timholy commented Jan 31, 2022

This is motivated by JuliaLang/julia#43990 (comment),
but doesn't seem likely to hurt anything even if that never merges.

This is motivated by JuliaLang/julia#43990 (comment),
but doesn't seem likely to hurt anything even if that never merges.
Copy link
Member

@giordano giordano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With Julia v1.7.1, on current master (same as v1.4.0):

% julia --project=/tmp --startup-file=no -q
julia> @time using GTK3_jll
  0.106958 seconds (367.35 k allocations: 17.844 MiB, 23.89% compilation time)

With this PR:

% julia --project=/tmp --startup-file=no -q
julia> @time using GTK3_jll
  0.102986 seconds (363.60 k allocations: 17.562 MiB, 25.75% compilation time)

It seems to be a net positive improvement in terms of memory allocations (even if very little) 👍

parse_wrapper_platform(basename(f)[1:end-3]) =>
joinpath(dir, "wrappers", f) for f in x
)
# (1) make the Dict type inferrable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this point, using Dict{Platform,String}( <generator> ) would be sufficient, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, specifying the exact Dict type would fix that.

@timholy timholy merged commit a590250 into master Jan 31, 2022
@timholy timholy deleted the teh/latency branch January 31, 2022 22:34
@timholy
Copy link
Member Author

timholy commented Jan 31, 2022

Any objections to me making a release?

@giordano
Copy link
Member

giordano commented Feb 1, 2022

No, it's fine 👍

contra-bit pushed a commit to contra-bit/JLLWrappers.jl that referenced this pull request Jul 10, 2024
This is motivated by JuliaLang/julia#43990 (comment),
but doesn't seem likely to hurt anything even if that never merges.
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