Initial reaction (more later if life doesn't intercede:):
- You have a 15-core system?
- You are doing no locking on your shared variables?
- What do you think that threads->exit does that return doesn't?
- Isn't pushing a value to an array called @sorted violating the expectations of the reader, even if not those of the algorithm?
- You neither threads::detach() nor threads::join() your threads.
Have you run this code to completion yet?
- Why past $end as a parameter, when it is never modified?
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.