Bug 83312 - Use QuickSort when sorting primitive values by string representation
Summary: Use QuickSort when sorting primitive values by string representation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-05 14:18 PDT by Benjamin Poulain
Modified: 2012-04-05 16:08 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.50 KB, patch)
2012-04-05 14:23 PDT, Benjamin Poulain
barraclough: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>