Skip to content

Optimisations#581

Merged
lshaw8317 merged 5 commits intomainfrom
optimisations
Feb 17, 2026
Merged

Optimisations#581
lshaw8317 merged 5 commits intomainfrom
optimisations

Conversation

@lshaw8317
Copy link
Collaborator

With these changes, one accelerates cumulative_sum for large arrays a little bit. For the benchmark bench/ndarray/cumsum_bench.py.

With old code:

N=511, 0.47549494107564294 s
N=645, 1.0405428409576416 s
N=812, 1.7176300684611006 s
N=1023, 3.627310434977214 s
N=1290, 11.596769571304321 s

With optimisation:

N=511, 0.46673170725504554 s
N=645, 1.0527909596761067 s
N=812, 1.718360980351766 s
N=1023, 3.9926660855611167 s
N=1290, 9.691950400670368 s

Copy link
Member

@FrancescAlted FrancescAlted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. You may want to update the plot of your recent blog ;-)

@lshaw8317 lshaw8317 merged commit 49232b6 into main Feb 17, 2026
17 checks passed
@lshaw8317 lshaw8317 deleted the optimisations branch February 17, 2026 07:58
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