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

Add a precompilation workload #74

Merged
merged 3 commits into from
Feb 13, 2024
Merged

Conversation

Tortar
Copy link
Contributor

@Tortar Tortar commented Feb 11, 2024

This cuts down the precompilation time quite a bit:

before:

julia> using SumTypes

julia> @time @eval @sum_type Re begin
           Empty
           Class(::UInt8)
           Rep(::Re)
           Alt(::Re,  ::Re)
           Cat(::Re,  ::Re)
           Diff(::Re, ::Re)
           And(::Re,  ::Re)
       end;
  1.448841 seconds (2.26 M allocations: 152.786 MiB, 3.72% gc time, 98.11% compilation time)

after:

julia> using SumTypes

julia> @time @eval @sum_type Re begin
           Empty
           Class(::UInt8)
           Rep(::Re)
           Alt(::Re,  ::Re)
           Cat(::Re,  ::Re)
           Diff(::Re, ::Re)
           And(::Re,  ::Re)
       end;
  0.142083 seconds (41.50 k allocations: 2.622 MiB, 82.27% compilation time)

Copy link

codecov bot commented Feb 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2934ed2) 100.00% compared to head (ebce857) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #74   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         4    +1     
  Lines          265       275   +10     
=========================================
+ Hits           265       275   +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MasonProtter
Copy link
Owner

Awesome stuff @Tortar!

@MasonProtter MasonProtter merged commit f870e95 into MasonProtter:master Feb 13, 2024
@Tortar Tortar deleted the precompile branch February 13, 2024 11:32
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