Repository navigation
Conversation
no_prefix_set: O(T log n) sort+segtree -> O(T) linear trie, input-order insert. determining_dna_health: O(T.G) out-scan -> O(T.log G) via per-state prefix health sums plus bisection. banded_alignment: O(nm) full-table scan -> O(nk) band-only enumeration with transient rows. dcel_overlay: O(n^4) per-vertex/per-edge full scans -> single-pass grouping of crossings onto edges and half-edges onto tails. range_tree: O(n^2 log n) take-while scans -> O(n log^2 n) bisection in cascade build and query bounds. segment_stabbing: O(m) per-query rank scan -> O(log m) bisection. AI-Tool: Muse Code (Meta Muse Spark)
Collaborator
Author
|
Superseded by #45 — all four area branches merged into one batch PR. |
|
| Project | clojure-code-snippet |
| Branch | fix/39-str-geom-complexity |
| Testbed | ubuntu-latest-clojure-rs |
⚠️ WARNING: Truncated view!The full continuous benchmarking report exceeds the maximum length allowed on this platform.
🐰 View full continuous benchmarking report in Bencher
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
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.
Part of #39 — the six string + computational-geometry items, all moved to
the python twins' complexity classes.
Changes
string_related/trie/no_prefix_set: sort+segtree → input-orderpersistent trie; O(T log n) → O(T) (600k words: 2.06s → 0.95s).
string_related/aho_corasick/determining_dna_health: per-state prefixhealth sums + bisect over ascending
:out; O(T·G) → O(T·log G)(20k genes/strand: 2.98s → 0.51s, 5.8x).
string_related/banded_alignment/banded_alignment: full-tableenumeration → band-only
doseqon transient rows; O(nm) → O(nk)(1500² k=5: 3.38s → 0.76s).
computational_geometry/dcel_overlay/solution: per-edge/per-vertexscans → single-pass transient grouping; O(n⁴) → O(n² log n)
(V=15028: 8.54s → 0.76s, 11x).
computational_geometry/range_tree/solution: take-while rank scans →binary search; O(n² log n) → O(n log²n) (n=12000: 5.66s → 0.57s).
computational_geometry/segment_stabbing/solution: per-query linearrank scan → bisect-right; O(m) → O(log m) per query
(100k segs/2k queries: 5.35s → 1.24s).
Validation
cmp) on hand-built small +adversarial inputs, cross-checked against the python twins (shared GPG
cases unavailable locally — CI covers them).
AI-Tool: Muse Code (Meta Muse Spark)