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

Fix & test 32-bit #47

Merged
merged 4 commits into from
Aug 8, 2023
Merged

Fix & test 32-bit #47

merged 4 commits into from
Aug 8, 2023

Conversation

timholy
Copy link
Collaborator

@timholy timholy commented Aug 5, 2023

Fixes #42

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2023

Codecov Report

Merging #47 (8d44a5c) into master (5545dfd) will increase coverage by 1.44%.
The diff coverage is 90.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master      #47      +/-   ##
==========================================
+ Coverage   92.06%   93.51%   +1.44%     
==========================================
  Files           6        7       +1     
  Lines        1387     1403      +16     
==========================================
+ Hits         1277     1312      +35     
+ Misses        110       91      -19     
Files Changed Coverage Δ
src/gridlayout.jl 94.08% <89.47%> (+0.85%) ⬆️
src/helpers.jl 81.25% <100.00%> (+3.75%) ⬆️

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@timholy
Copy link
Collaborator Author

timholy commented Aug 8, 2023

Thanks @jkrumbiegel !

@jkrumbiegel jkrumbiegel merged commit c4c7c86 into master Aug 8, 2023
6 checks passed
@timholy timholy deleted the teh/32bit branch August 9, 2023 18:23
@timholy
Copy link
Collaborator Author

timholy commented Aug 9, 2023

Compiler-efficiency tip: if foo(i::Integer, otherargs...) is a "big" method (and takes a while to compile), and if there's no real behavioral difference from type of Integer to another, then you have the following options:

Option 1: a single method foo(i::Integer, otherargs...)

Calling foo(Int32(i), otherargs...) and foo(Int64(i), otherargs...) requires time 2*tcompile_big because you're compiling a big method for two different specializations (i::Int32 and i::Int64).

Options 2: a short stub method and one main method

This looks like the following:

function foo(i::Int, otherargs...)
    # this is the main ("big") definition
end
foo(i::Integer, otherargs...) = foo(Int(i), otherargs...)

Here, calling foo(Int32(i), otherargs...) and foo(Int64(i), otherargs...) requires time tcompile_big + tcompile_small because the big method gets compiled only for i::Int, and henceforth you only compile the small method for each new subtype of Integer.

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.

Cannot load GridLayoutBase on 32-bit systems
3 participants