开发者

Sort Using Map and Reduce Techinques

开发者 https://www.devze.com 2023-04-11 01:08 出处:网络
Given a huge data set of integers, what would be the advantages of using map and reduce techniques over traditional sorting algorithms such as q开发者_开发问答uicksort and mergesort?Map/reduce is more

Given a huge data set of integers, what would be the advantages of using map and reduce techniques over traditional sorting algorithms such as q开发者_开发问答uicksort and mergesort?


Map/reduce is more or less just a (scalable, common) way of describing a parallel computation. So you'd express a traditional sorting algorithm, like mergesort or quicksort, as a map/reduce if you wanted to do it as a parallel computation.

It's not a question of "is map/reduce better than mergesort or quicksort," because map/reduce is just a tool for implementing a sorting algorithm like mergesort or quicksort in a parallel way.


Don't get me wrong, but MapReduce actually use sorting algorithms like quicksort and mergesort to sort the input for the reduce step. MapReduce is not a new sort algorithm, it is just a way to process data. And along the steps it gets sorted, that is just a nice side-effect.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号