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

Change map for a for loop #45

Merged
merged 2 commits into from
Mar 31, 2021
Merged

Conversation

andreasnoack
Copy link
Contributor

to work around JuliaLang/julia#35800

which can cause very slow compile times in Julia 1.6. In Pumas, this change alone had the following effect on a single function call:

Before:

40.194758 seconds (83.73 M allocations: 6.623 GiB, 2.70% gc time, 99.99% compilation time)

After

2.916390 seconds (7.31 M allocations: 446.180 MiB, 3.71% gc time, 99.96% compilation time)

I'm erroring out in the empty case since it avoids the problem of determining the return type. I'd think that it's expected that the number of trajectories is positive. I actually think that part of the problem with map is that it has to consider the empty case but that is mostly speculation.

JuliaLang/julia#35800

which can cause very slow compile times in Julia 1.6.
@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #45 (b3ea422) into master (3150439) will increase coverage by 0.12%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #45      +/-   ##
=========================================
+ Coverage    9.66%   9.78%   +0.12%     
=========================================
  Files          39      39              
  Lines        2826    2830       +4     
=========================================
+ Hits          273     277       +4     
  Misses       2553    2553              
Impacted Files Coverage Δ
src/ensemble/basic_ensemble_solve.jl 26.22% <87.50%> (+2.50%) ⬆️

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 3150439...b3ea422. Read the comment docs.

@ChrisRackauckas
Copy link
Member

Seriously 😱?

@andreasnoack
Copy link
Contributor Author

Yes. It's really sad.

@korsbo
Copy link

korsbo commented Mar 31, 2021

Ickie ickie! You're even growing an array and it's still much faster - before 1.6 I would have been on the hunt to do the exact opposite changes to my code 😢

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.

3 participants