![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Re^9: PDL and srand puzzle - testing using threadsby marioroy (Prior) |
on Jun 06, 2024 at 07:34 UTC ( [id://11159814]=note: print w/replies, xml ) | Need Help?? |
The following uses threads for comparison. Locking is required to not garble output, handled automatically i.e. MCE->say, MCE->print, MCE->printf. Here, a count below 32 million indicates duplicate lines in the output. Edit: etj identified a race condition, hence less uniqueness.
CORE::rand()
PDL->random
Improving sort Mentioned in my prior post, the parallel mcesort program with integrated mini-MCE resides in a GitHub Gist. Copy the script to /usr/local/bin and sudo chmod +x /usr/local/bin/mcesort or bin path of your choice.
In Section
Seekers of Perl Wisdom
|
|