Skip to content

Fast CPUs have gotten faster: reduce self-test times by factor 5#38

Open
corneliusroemer wants to merge 2 commits intoprimesearch:mainfrom
corneliusroemer:patch-1
Open

Fast CPUs have gotten faster: reduce self-test times by factor 5#38
corneliusroemer wants to merge 2 commits intoprimesearch:mainfrom
corneliusroemer:patch-1

Conversation

@corneliusroemer
Copy link
Copy Markdown

I just downloaded Mlucas on my M1 MBP (32GB RAM) and ran the tiny and small self tests. They were at least a factor of 5 faster than what was stated.

This PR divides all self-test run-times by around a factor of 5.

Self-test runtimes:
tiny: 8s (instead of 1 minute)
small: 1m23s (instead of 10 minutes)

I just downloaded Mlucas on my M1 MBP (32GB RAM) and ran the tiny and small self tests. They were at least a factor of 5 faster than what was stated.

This PR divides all self-test run-times by around a factor of 5.

Self-test runtimes:
tiny: 8s (instead of 1 minute)
small: 1m23s (instead of 10 minutes)
@tdulcet
Copy link
Copy Markdown
Member

tdulcet commented Oct 20, 2024

Thanks for the PR!

How many threads were you using to benchmark? It looks like you forgot to update the medium and egregious/xxl self-test times.

Note that more of this help documentation file needs to be updated. For example, it is missing the new teensy self-test and a few of other the FFT length ranges were also updated by Ernst in v21, which could partially explain the time discrepancies you noticed. If possible, I would recommend running some of the larger self-tests on your system to confirm the new runtimes.

Mlucas/src/Mlucas.c

Lines 3455 to 3467 in 4db9fbc

/* Number of distinct FFT lengths supported for self-tests: */
#define numTest 136 // = sum of all the subranges below
/* Number of FFT lengths in the various subranges of the full self-test suite: */
#define numTeensy 15 // v21: added 'Teensy', moved 8 smallest 'Tiny' into it,
#define numTiny 32 // changed counts from [-,32,32,16,24,16,9,0,0] to [15,32,24,20,20,16,9,0,0]
#define numSmall 24
#define numMedium 20
#define numLarge 20
#define numHuge 16
/* Adding larger FFT lengths to test vectors requires supporting changes to Mdata.h:MAX_FFT_LENGTH_IN_K and get_fft_radices.c */
#define numEgregious 9
#define numBrobdingnagian 0
#define numGodzillian 0

@corneliusroemer
Copy link
Copy Markdown
Author

I now also ran the medium (recommended default) test (Mlucas -s m) and it took 10m9s (single CPU), I forgot to update that one actually, done now!

I didn't forget to update the egregious one - I just didn't know whether several days would now be just one day or not, so I played it safe and kept it at several days.

@tdulcet tdulcet added the documentation Improvements or additions to documentation label Oct 20, 2024
@tdulcet tdulcet force-pushed the main branch 2 times, most recently from 07df4ce to 53cf9dc Compare November 20, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants