I wasn't 100% sure what you meant by next line prefetch. Did you mean disabling hardware prefetch in the BIOS or setting scratchpad prefetch mode in the XMRig config.json file to 0 from 1?
Thanks, RAM timing did better than I expected, however, one has to know what one is doing to get it right.
Next line prefetch is when the CPU speculatively prefetches the next cache line to optimize sequential memory access.
It's no good for random access. It's reported as "MSR MOD" by xmrig, need to run as admin.
Xmrig is smart enough to optimize the number of threads, are you sure you were using all 32?
The best performance is usually 1 thread for every 2MB of cache. This matches up with the number
of physical cores on most mainstream CPUs, meaning hyperthreading isn't necessary or helpful.
You know what, I realised I've made a big mistake

.... I've confused the MSR Mod and huge page options! I'll edit my existing post and test with huge pages off tomorrow.
I'm definitely using all 32, same with my 3950x. As you suggest though, this isn't optimal for all CPUs, my 9900k definitely performs better using 8 threads(as opposed to 16) preferably with affinity set to 1 per physical core.
It seems to be a Ryzen thing where performance is better with all threads used.