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

Re-use allocations in mutation loop #387

Merged
merged 8 commits into from
Dec 13, 2024
Merged

Re-use allocations in mutation loop #387

merged 8 commits into from
Dec 13, 2024

Conversation

MilesCranmer
Copy link
Owner

This re-uses allocations in the mutation loop. This should hopefully result in a nice speed up from reduced need for garbage collection.

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Benchmark Results

master 19eeb11... master/19eeb111d0cbbb...
search/multithreading 17.2 ± 0.94 s 18.7 ± 0.35 s 0.921
search/serial 29 ± 0.36 s 29.5 ± 0.46 s 0.983
utils/best_of_sample 1.61 ± 0.43 μs 1.73 ± 1.3 μs 0.93
utils/check_constraints_x10 11.3 ± 3 μs 11.1 ± 2.8 μs 1.02
utils/compute_complexity_x10/Float64 2.06 ± 0.11 μs 2.09 ± 0.12 μs 0.986
utils/compute_complexity_x10/Int64 2 ± 0.11 μs 2.03 ± 0.11 μs 0.985
utils/compute_complexity_x10/nothing 1.43 ± 0.14 μs 1.46 ± 0.13 μs 0.979
utils/insert_random_op_x10 5.66 ± 1.8 μs 5.74 ± 1.9 μs 0.986
utils/next_generation_x100 0.343 ± 0.093 ms 0.428 ± 0.097 ms 0.801
utils/optimize_constants_x10 0.0367 ± 0.0085 s 0.0351 ± 0.0082 s 1.04
utils/randomly_rotate_tree_x10 5.27 ± 0.59 μs 5.18 ± 0.56 μs 1.02
time_to_load 1.98 ± 0.016 s 2.02 ± 0.024 s 0.98

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

@coveralls
Copy link

coveralls commented Dec 12, 2024

Pull Request Test Coverage Report for Build 12323432167

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 95.173%

Totals Coverage Status
Change from base Build 12271094085: 0.01%
Covered Lines: 3135
Relevant Lines: 3294

💛 - Coveralls

@MilesCranmer
Copy link
Owner Author

MilesCranmer commented Dec 13, 2024

Hm. There’s no speedup… not sure it’s worth the added complexity?

Edit: made the interface have a fallback, it seems ok now. My guess is that the perf gains will be on larger systems with larger trees where the extra copies hurt

@MilesCranmer MilesCranmer force-pushed the reduce-allocs2 branch 3 times, most recently from 0c46f4a to 227f55f Compare December 13, 2024 21:37
@MilesCranmer MilesCranmer merged commit 701889f into master Dec 13, 2024
17 checks passed
@MilesCranmer MilesCranmer deleted the reduce-allocs2 branch December 13, 2024 22:39
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