Nathan Ingersoll schrieb: > Nice work Peter, please commit. We should probably convert > ecore_file_ls to use these functions too. > > Do you have a sense of how many nodes it takes for the heapsort to > have a significant advantage? We could have a sort wrapper to choose > the appropriate sort based on the number of nodes, but expose both > api's for apps that want to be certain which algorithm is chosen. > Here are two graphs that shows the behavior of the two algorithms once up to 50,000 nodes and one up to 500,000 nodes.
http://mowem.de/ecore/merge-heap.pdf http://mowem.de/ecore/merge-heap2.pdf To determine where the heap is actually better then the merge sort here is a third graph that shows the time that the merge sort needed relative to the heap sort. As you can clearly see here it is about 80,000 nodes. http://mowem.de/ecore/merge-heap3.pdf So the wrapper should probably start at this value to use the heap sort. If you want to make some test on your own, you can find my test program under: http://mowem.de/ecore/ecore_list_sort.c Hope that helps you Peter ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel