Skip to content

Closes #3974 permutation performance fix - #3975

Merged
ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:3974_permute_performance_fix
Jan 23, 2025
Merged

ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:3974_permute_performance_fix

Conversation

@ajpotts

@ajpotts ajpotts commented Jan 20, 2025 •

Copy link
Copy Markdown
Contributor

This PR adds a method argument to the permutation function. When method="ArgSort", the permutation function will use an ak.argsort on a random array of floats to generate the permutation. When method="FisherYates", the permutation function will use the chapel permutation function which is serial and relies on the Fisher Yates algorithm. Fisher Yates is slower, but uses less memory as it is all in place.

Closes #3974 permutation performance fix

@ajpotts
ajpotts force-pushed the 3974_permute_performance_fix branch 3 times, most recently from 7e4feaf to f697c97 Compare January 20, 2025 21:06
@ajpotts ajpotts changed the title 3974 permute performance fix Closes #3974 permutation performance fix Jan 20, 2025
@ajpotts
ajpotts force-pushed the 3974_permute_performance_fix branch from 58b538a to b7e942b Compare January 20, 2025 22:57
@ajpotts
ajpotts marked this pull request as ready for review January 20, 2025 23:02
Comment thread arkouda/numpy/random/_generator.py Resolved

@drculhane drculhane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Passes tests, looks solid, and I have only the comment about passing "method" from python to Chapel, but not using it there.

@ajpotts
ajpotts force-pushed the 3974_permute_performance_fix branch from 36d033d to de6b60d Compare January 23, 2025 20:28
@ajpotts
ajpotts force-pushed the 3974_permute_performance_fix branch from 8bfd31f to d11f0b9 Compare January 23, 2025 20:29
@ajpotts
ajpotts added this pull request to the merge queue Jan 23, 2025
Merged via the queue into Bears-R-Us:master with commit 4fa2e44 Jan 23, 2025
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.

permutation performance fix

3 participants