Repository navigation
Conversation
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.
iswt2makes many smallidwtncalls, where coefficient validation and Python bookkeeping account for a substantial part of the runtime. This change removes the duplicateNonefilter, replaces NumPy uniqueness with a Python set for key lengths, reuses the validated key length and shapes, and reduces temporary key lists and repeated lookups during reconstruction. Subbands are still reconstructed in lexicographic order, with the existing dtype promotion.For
swt_benchmarks.Iswt2TimeSuite.time_iswt2(16, 'haar'):Measured against commit
c9b542b2d2c37d28ed1d9bd49d178d2769608905using the repository's unchanged ASV benchmark, Python 3.12.13, NumPy 2.5.4, and ASV 0.6.6 on Linux x86_64. Both versions used the same isolated core and compiled extensions. ASV collected 27 samples per version across three rounds, with 10 calls per sample and a one-second warmup per round; coefficient setup was outside the timed method.Three fresh paired harness runs on the broader seeded workload passed exact output comparisons, with candidate/baseline time ratios of 0.759462, 0.748694, and 0.782821 (median 0.759462). Each run used nine baseline/candidate pairs. These ratios describe the complete harness workload, separate from the single ASV case above.
Validation:
python -m pytest pywt/tests -q: 1,052 passed, 2 skipped on the patched source tree.AI assistance: Weco (Claude Opus 5.5) generated optimization candidates; Codex assisted with selection, source review, benchmarking, testing, and this description.
Weco share link: https://dashboard.weco.ai/share/W-VopKsB0Xyzekg_9r9DquGM1nulxr6N