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

A little refactoring to improve inference and precompilation #880

Merged
merged 5 commits into from
Sep 1, 2021

Conversation

quinnj
Copy link
Member

@quinnj quinnj commented Aug 29, 2021

The changes in files that are not precompile.jl are inference
improvements; mainly from inspecting results of @code_typed,
Cthulhu.jl, and SnoopCompile.jl. The changes in precompile.jl are from
comments from @timholy recommending that in our precompile process, we
can just call regular code instead needing to call precompile with
methods/arg types. I'm aware I don't understand all the details around
precompilation, method invalidation, etc. but unfortunately, I feel a
bit blocked with CSV.jl's precompilation. With the changes in #875, we
now see a fixed overhead of allocations when parsing due, I'm told, to
an issue in Base Julia
(JuliaLang/julia#34055).

The changes in files that are not precompile.jl are inference
improvements; mainly from inspecting results of `@code_typed`,
Cthulhu.jl, and SnoopCompile.jl. The changes in precompile.jl are from
comments from @timholy recommending that in our precompile process, we
can just call regular code instead needing to call `precompile` with
methods/arg types. I'm aware I don't understand all the details around
precompilation, method invalidation, etc. but unfortunately, I feel a
bit blocked with CSV.jl's precompilation. With the changes in #875, we
now see a fixed overhead of allocations when parsing due, I'm told, to
an issue in Base Julia
(JuliaLang/julia#34055).
@codecov
Copy link

codecov bot commented Aug 29, 2021

Codecov Report

Merging #880 (f8cc67c) into main (79f856f) will increase coverage by 0.84%.
The diff coverage is 91.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #880      +/-   ##
==========================================
+ Coverage   88.92%   89.76%   +0.84%     
==========================================
  Files           9        9              
  Lines        2113     2111       -2     
==========================================
+ Hits         1879     1895      +16     
+ Misses        234      216      -18     
Impacted Files Coverage Δ
src/precompile.jl 0.00% <0.00%> (-96.67%) ⬇️
src/utils.jl 82.83% <90.69%> (-0.03%) ⬇️
src/context.jl 87.91% <90.90%> (+3.01%) ⬆️
src/file.jl 95.12% <93.13%> (+0.39%) ⬆️
src/CSV.jl 33.33% <100.00%> (-4.17%) ⬇️
src/detection.jl 95.65% <100.00%> (+3.34%) ⬆️
src/rows.jl 86.78% <100.00%> (-0.08%) ⬇️
src/write.jl 83.79% <0.00%> (-0.36%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79f856f...f8cc67c. Read the comment docs.

@quinnj quinnj merged commit 4efa2f2 into main Sep 1, 2021
@quinnj quinnj deleted the jq/precompile2 branch September 1, 2021 03:37
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.

1 participant