Skip to content

Conversation

@michaelborkowski
Copy link
Owner

Fixing cilksort segfaults and slowness by porting the optimizations to parallel mergesort (I think it's mainly the recursive helper function and the {-# INLINE #-} )

Haven't seriously benchmarked, but seems slightly faster than parallel mergesort because of the fallback to (seq) quicksort instead of sequential mergesort. On 10 million items:

michael@COS-8MBORK-3912:~/lh-array-sort-newer$ cabal run benchrunner -- 1 "Cilksort" Par 10000000 +RTS -N4
Running OurSort Cilksort (Par)
========================================
array size = 10000000
iter time: 2.155518032
Sorted: OK
BENCHMARK: OurSort Cilksort
RESULT: 10000000
SIZE: 10000000
ITERS: 1
BATCHTIME: 2.155518032
SELFTIMED: 2.155518032

michael@COS-8MBORK-3912:~/lh-array-sort-newer$ cabal run benchrunner -- 1 "Mergesort" Par 10000000 +RTS -N4
Running OurSort Mergesort (Par)
========================================
array size = 10000000
iter time: 3.010259488
Sorted: OK
BENCHMARK: OurSort Mergesort
RESULT: 10000000
SIZE: 10000000
ITERS: 1
BATCHTIME: 3.010259488
SELFTIMED: 3.010259488

@michaelborkowski
Copy link
Owner Author

I didn't mean for this PR to be carrying along several old commits... I will update this one later (Don't merge!)

@ulysses4ever
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants