Skip to content

hassan7100/Parallel-Merge-Sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Parallel-Merge-Sort

Includes an implementation for merge sort using work stealing mechanism

50_000_000 elements array sorting, 12 threads, 1_000_000 elements threshold, we get these results:

Parallel Time: 797 ms,

Serial Time: 5498 ms

Which is 86% faster sorting, in other words, ~6.9 times faster than serial sorting.

I noticed that the threshold must be choosed carefully, because if you keep assigning small tasks to threads, this would mean some more time as there is an overhead for cpu scheduling, context switiching etc.

About

Includes an implementation for merge sort using work stealing mechanism

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages