c# - DataView sort method - which sorting algorithm is used? -
i using vs2012, .net framework 4.5. need know sorting algorithm used in dataview.sort?
my code:
var table = new datatable(); table.columns.add("word"); table.defaultview.sort = "word";//after row, defaultdataview sorted
so sorting algorithm used here?
the sort method in dataview implements quicksort algorithm. chooses arbitrary midpoint, places values lower midpoint's left , higher values right. applies recursively left , right sections. recurse down sections cannot divided smaller sections (i.e., when section consists of single array member), @ point sort has completed. using big-o notation, can algorithm executes in o(n log n) time, efficient can expect sorting algorithm. long each iteration of sort divides set of indices 2 equal parts, dealing logarithm of base 2 prove have instrument system.data code , check run-time performance testing tool.
update:
you take @ reflector utility , follow post...its explained here dataview sort
Comments
Post a Comment