HeapSnapshot: replace O(N*ln(N)) algorithm of sorting with O(N) one.
authorloislo@chromium.org <loislo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 16 Sep 2013 13:13:42 +0000 (13:13 +0000)
committerloislo@chromium.org <loislo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 16 Sep 2013 13:13:42 +0000 (13:13 +0000)
commit0daf224c171c4fcd4f8ddb58a684a1f7c96525fc
tree60965958299e6881e191f28a0258b66f23534531
parentf30a73434641bf318fc2a5ca93f2b3e1747dd9a9
HeapSnapshot: replace O(N*ln(N)) algorithm of sorting with O(N) one.

We have HashMap for the strings. They got id sequentially. So we could use index sort.

BUG=none
R=alph@chromium.org, yangguo@chromium.org

Review URL: https://codereview.chromium.org/24174002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/heap-snapshot-generator.cc
src/heap-snapshot-generator.h