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

Precompile common workflows #99

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Sep 7, 2022

Some examples:
On master

julia> @time @eval roots(Fun(sin,Interval(big"0.0", big"1.0")))
  6.249275 seconds (19.64 M allocations: 1.002 GiB, 8.53% gc time, 99.67% compilation time)
1-element Vector{BigFloat}:
 2.590850566528333387615905558840119871334800109330884415507111041050577540894939e-77

julia> @time @eval DefiniteIntegral()*Fun(Chebyshev(), [0,1])
  0.487484 seconds (1.18 M allocations: 65.425 MiB, 25.34% gc time, 98.12% compilation time)
0.0 anywhere

julia> @time @eval sin(Fun());
 31.251794 seconds (67.79 M allocations: 3.706 GiB, 4.99% gc time, 99.92% compilation time)

This PR

julia> @time @eval roots(Fun(sin,Interval(big"0.0", big"1.0")))
  3.415315 seconds (3.21 M allocations: 165.702 MiB, 1.46% gc time, 99.02% compilation time: 45% of which was recompilation)
1-element Vector{BigFloat}:
 2.590850566528333387615905558840119871334800109330884415507111041050577540894939e-77

julia> @time @eval DefiniteIntegral()*Fun(Chebyshev(), [0,1])
  0.147715 seconds (217.09 k allocations: 13.275 MiB, 94.74% compilation time)
0.0 anywhere

julia> @time @eval sin(Fun());
 10.228372 seconds (4.80 M allocations: 242.355 MiB, 0.59% gc time, 99.78% compilation time: 29% of which was recompilation)

This comes at the expense of increased precompilation time, and a somewhat larger cache, but that's probably acceptable.

Still WIP, more calls to be added.

@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Patch coverage has no change and project coverage change: -0.16 ⚠️

Comparison is base (fcfe37c) 70.71% compared to head (064594d) 70.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
- Coverage   70.71%   70.56%   -0.16%     
==========================================
  Files          29       30       +1     
  Lines        2667     2670       +3     
==========================================
- Hits         1886     1884       -2     
- Misses        781      786       +5     
Impacted Files Coverage Δ
src/ApproxFunOrthogonalPolynomials.jl 81.48% <ø> (ø)
src/precompile.jl 0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jishnub jishnub force-pushed the snoopprecompile branch 2 times, most recently from 68fc919 to db16987 Compare October 20, 2022 15:06
@jishnub jishnub changed the title Snoopprecompile Precompile common workflows May 1, 2023
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