Skip to content

Conversation

@ajpotts
Copy link
Contributor

@ajpotts ajpotts commented Jan 20, 2025

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
Copy link
Contributor

@drculhane drculhane left a comment

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
19 checks passed
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