[Webkit-unassigned] [Bug 100754] New: Faster sorting of numeric arrays

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 30 06:39:48 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=100754

           Summary: Faster sorting of numeric arrays
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ctruta at gmail.com


Currently, dense arrays are sorted with qsort(), although std::sort offers a better performance. The two main reasons are the better algorithm (Introsort vs. Quicksort) and the inlining of the comparator (see Item 46 "Consider function objects instead of functions as algorithm parameters" in Scott Meyers' "Effective STL").

In addition, I noticed that sorting is highly asymmetric: descending numeric sorting is much slower than ascending numeric sorting, because the former lacks a specialized comparator.

The upcoming patch will address these issues.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list