Bug 83312

Summary: Use QuickSort when sorting primitive values by string representation
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: JavaScriptCoreAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, fpizlo, ggaren
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch barraclough: review+

Description Benjamin Poulain 2012-04-05 14:18:21 PDT
Currently, we use a stable sort when sorting the JSValues of a JSArray.

When all the values are primitive types, one cannot differentiate two values with equal string representation. We should use a faster, non stable, sort algorithm in that case.
Comment 1 Benjamin Poulain 2012-04-05 14:23:45 PDT
Created attachment 135904 [details]
Patch
Comment 2 Gavin Barraclough 2012-04-05 15:36:38 PDT
Comment on attachment 135904 [details]
Patch

very nice!
Comment 3 Benjamin Poulain 2012-04-05 16:08:34 PDT
Committed r113391: <http://trac.webkit.org/changeset/113391>