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

do not specialize on the function in adapted_grid #117

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

KristofferC
Copy link
Contributor

@KristofferC KristofferC commented Aug 18, 2021

This avoids having to recompile it for all different input functions

Before:

julia> @time adapted_grid(x->x, (0,1));
  0.748009 seconds (1.60 M allocations: 82.982 MiB, 3.17% gc time, 99.26% compilation time)

julia> @time adapted_grid(x->x, (0,1));
  0.490260 seconds (593.23 k allocations: 30.643 MiB, 16.33% gc time, 99.97% compilation time)

julia> @time adapted_grid(x->x, (0,1));
  0.488363 seconds (593.23 k allocations: 30.639 MiB, 9.39% gc time, 99.97% compilation time)

After:

julia> @time adapted_grid(x->x, (0,1));
  0.732140 seconds (1.04 M allocations: 54.736 MiB, 3.45% gc time, 98.40% compilation time)

julia> @time adapted_grid(x->x, (0,1));
  0.044722 seconds (113.41 k allocations: 6.245 MiB, 99.04% compilation time)

julia> @time adapted_grid(x->x, (0,1));
  0.044496 seconds (113.41 k allocations: 6.246 MiB, 99.29% compilation time)

this avoids having to recompile it for all different input functions
@KristofferC
Copy link
Contributor Author

cc @t-bltg

@t-bltg t-bltg merged commit cd479c8 into JuliaPlots:master Aug 25, 2021
@t-bltg
Copy link
Member

t-bltg commented Aug 25, 2021

Sorry I missed that PR, thanks !
Will wait for #118 to be fixed before bumping a new version.

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