Repository navigation
perf: markers grouped by patch with one sort, and marker counts from one histogram - #74
Merged
Merged
Conversation
…d tags from marker counts.
…ed by marker counts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
deposit,interpolateand_owners(behindownerandmigrate) used to find each patch's markers withnp.flatnonzero(found == number): one scan of all markers per patch, so 386 × 200k comparisons on the quadtree benchmark._by_patchsorts the patch numbers once (stable) and yields each patch's indices, in the order of the patches as before.marker_countshistograms the finest requested level once and sums blocks of cells into the coarser levels, instead of onehistogramddper level. Finer levels split coarse cells evenly, graded axes included, so the counts are the same; a new test checks them against per-level histograms on uniform and graded axes.benchmarks/quadtreenow runs one untimed cycle first. The compiled kernels load at their first call (580 ms for the first deposit), and the earlier runs counted that in their first timed step.RESULTS.mdcomparesdevelwith this branch together with perf: build a CopyPlan with array operations over the copies mpiarray#73 (aCopyPlanbuilt with array operations).Serial, median of 3, ms per step:
Tagging gets three times faster. With blocks of 8, gather goes from 131 to 69 ms, migrate from 66 to 36, halos from 266 to 204. The changes here don't depend on the mpiarray PR; the halo and regrid numbers do.
Checklist
pre-commit runandpytestpass (730 passed locally)docs/, tutorials orREADME.qmd) are updated where the behaviour changedfeat:,fix:,docs:, ...)