Bug 27657 - [Dialogs] TwoArraySorter should not use quicksort all the way down
Summary: [Dialogs] TwoArraySorter should not use quicksort all the way down
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2002-12-04 08:20 EST by Adam Kiezun CLA
Modified: 2002-12-05 04:15 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-12-04 08:20:39 EST
TwoArraySorter uses quicksort even on small arrays, which results in many, many 
redundant recursive calls.
It should stop at level, say, 7 and sort small sections by inserion sort.
I think this should reduce the 4.5 second delay I see when using OpenType
Comment 1 Nick Edgar CLA 2002-12-04 16:16:04 EST
Quicksort results in log N recursive calls.  So even if we stop at size 8, 
we'll only save 3 recursive calls.
Comment 2 Adam Kiezun CLA 2002-12-05 04:15:07 EST
for a list of 16'000 elements (to approximate the number of types in 
bigworkspace) there are 2'000 fragments of length 8.
that means 6'000 recursive calls more.