Repository navigation
Cluster search: a box for each edge of small rings, chunks tried by their boxes first - #9
Merged
Merged
Conversation
… by their boxes first The search for clusters by the distance of edges gave a ring one box for every sixteen consecutive edges. A board outline of four edges, or of sixteen once offset, was then one box over the whole board: every hole inside it went down its own tree to every leaf and tried each of its edges with each of the outline's, 16 box tests an edge of input. On the pour of testdata/ (242 k vertices, 2153 holes) the search ran out of its budget in the grow of an opening and the union was computed in one piece: 730 ms for the 620 ms of 0.0.6, and the union with 40 spokes 141 ms for 12.5 ms. A ring of n edges now has boxes of n / 8 edges, between one and sixteen, so the sides of a small ring have a box each; two chunks whose boxes come within reach first have their edges tried against the other chunk's box, and only those within its reach against each other; and the budget is 16 box tests an edge of input for 8. examples/perf.rs cadlab, one thread (0.0.6, the commit before, this): opening 620, 730, 110 ms; offset by -100 um 80, 47, 35 ms; by +100 um 577, 687, 76 ms; union with 40 spokes 12.5, 141, 7.0 ms. The recorded openings of three boards are as they were (cynthion 5.6 s, 3.5 s with a memo). Same output: the hash of every vertex of every result on the recorded calls and this pour, with and without rayon and a memo. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Follow-up to #7, before 0.0.7 is released: the repository's own pour benchmark (
examples/perf.rs cadlab, the pour oftestdata/) was slower with #7 than with 0.0.6, which the recorded openings measured for #7 did not show.The search for clusters by the distance of edges gave a ring one box for every sixteen consecutive edges. A board outline of four edges (sixteen once offset) was then one box over the whole board: every hole inside it went down its own tree to every leaf and tried each of its edges with each of the outline's, 16 box tests an edge of input. The search ran out of its budget in the grow of the opening and that union was computed in one piece.
Now a ring of
nedges has boxes ofn / 8edges, between one and sixteen; two chunks whose boxes come within reach first have their edges tried against the other chunk's box, and only those within its reach against each other; the budget is 16 box tests an edge of input for 8.examples/perf.rs cadlab, one thread, ms:openingby 100 umoffsetby -100 umoffsetby +100 umThe recorded openings of #7 are as they were (5.6 s for the largest set, 3.5 s with a memo). Same output: the hash of every vertex of every result on the recorded calls and on this pour is that of 0.0.6, without
rayonand with it on one and four threads, with and without a memo, and with every reused result computed and compared.Checked here:
cargo fmt --check, clippy with all features (-D warnings), the tests in release with all features, the cluster and memo tests in debug. Not run here: the i686 target, Windows and macOS (CI), the fuzz targets, the Clipper2 oracle.🤖 Generated with Claude Code