Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General changes 20240212 #917

Merged
merged 12 commits into from
Feb 13, 2024
Merged

General changes 20240212 #917

merged 12 commits into from
Feb 13, 2024

Conversation

shawnlaffan
Copy link
Owner

A set of general optimisations and cleanups.

This fixes one copy-paste error where the
wrong cache name was being used and so the
cache was never recovered.
More efficient than passing a default
(not that it makes much difference here).
If there is only one valid group then there is no need
to attempt any iterations for the curveball or
modified independent swaps randomisations.
This saves randomisations transposing the data,
only for it to again be transposed inside the add
method.
Previously it was only package level settings.
The progress dialogue takes a decent chunk of time
under profiling.  This is largely because it triggers
the main loop which then refreshes the display.

The threshold is currently set to one second which
should be good enough for most purposes.
No one should really be using this function
for research but we might as well make it
run in reasonable time.
Gives a slight speedup.

Ultimately we will replace these calls with
n-at-a-time for loops but that requires a
minimum perl version of 5.36.
This allows savings for randomisations that
generate many different objects, all with the
same set of elements.
It was returning the package cache value.
This is the same array but we might as well
avoid the cache lookup.
@shawnlaffan shawnlaffan merged commit f9078c1 into master Feb 13, 2024
8 checks passed
@shawnlaffan shawnlaffan deleted the general_changes_20240212 branch February 13, 2024 06:30
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.

1 participant