apache/incubator-spark — pull request #273 by rxin (2013-12-18 02:46:14+00:00)
Title: Fixed a performance problem in RDD.top and BoundedPriorityQueue

BoundedPriority was actually traversing the entire queue to calculate the size, resulting in bad performance in insertion.

This should also cherry pick cleanly into branch-0.8.