[PATCH] D36423: [libc++] Introsort based sorting function

DIVYA SHANMUGHAN via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 09:57:29 PDT 2017


DIVYA added a comment.

benchmarks/algorithms.bench.cpp Results

With old code (in ns)

BM_sort_std_common<std::vector<int>>/16384	:     730752	                      	
BM_sort_std_common<std::vector<int>>/32768	:  1.58E+06	                    	                   	
BM_sort_std_ascending<std::vector<int>>/16384	 :    17160.5	                       	
BM_sort_std_ascending<std::vector<int>>/32768	  :   35350.1	                      	                   		
BM_sort_std_descending<std::vector<int>>/16384      : 35809	                       	
BM_sort_std_descending<std::vector<int>>/32768	    : 72133	                      	                     		
BM_sort_std_list_with_vector<std::list<int>>/16384  : 124250	                       	
BM_sort_std_list_with_vector<std::list<int>>/32768  : 247705	                       	                   	
BM_sort_std_worst_quick<std::vector<int>>/16384	  :   1.03E+07	                    	
BM_sort_std_worst_quick<std::vector<int>>/32768	   :  4.04E+07

With new code (in ns)

BM_sort_std_common<std::vector<int>>/16384	:	                       720510		
BM_sort_std_common<std::vector<int>>/32768	  :	                      1.55E+06				
BM_sort_std_ascending<std::vector<int>>/16384	 :	                       17164.9		
BM_sort_std_ascending<std::vector<int>>/32768	 :	                       34726.7				
BM_sort_std_descending<std::vector<int>>/16384       :	                        35671		
BM_sort_std_descending<std::vector<int>>/32768	   :	                       72100.7				
BM_sort_std_list_with_vector<std::list<int>>/16384   :	                       125816		
BM_sort_std_list_with_vector<std::list<int>>/32768  :                       247450				
BM_sort_std_worst_quick<std::vector<int>>/16384	     :                    987016		
BM_sort_std_worst_quick<std::vector<int>>/32768	   :	                      2.14E+06


https://reviews.llvm.org/D36423





More information about the cfe-commits mailing list