Bug 35577 - [Qt] QScriptConverter::toString() should use QVarLengthArray instead of QByteArray
Summary: [Qt] QScriptConverter::toString() should use QVarLengthArray instead of QByte...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Minor
Assignee: Jędrzej Nowacki
URL:
Keywords: Qt
Depends on: 34850
Blocks: 31863
  Show dependency treegraph
 
Reported: 2010-03-02 04:27 PST by Jędrzej Nowacki
Modified: 2010-03-07 00:16 PST (History)
2 users (show)

See Also:


Attachments
Fix v1 (4.16 KB, patch)
2010-03-04 05:56 PST, Jędrzej Nowacki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jędrzej Nowacki 2010-03-02 04:27:23 PST
QScriptConverter::toString() should use the QVarLengthArray instead of the QByteArray. The QVarLengthArray uses stack memory allocation which is faster. The enhancement was suggested in bug 34850.
Comment 1 Jędrzej Nowacki 2010-03-04 05:56:02 PST
Created attachment 50008 [details]
Fix v1

The patch reduces run time of the QScriptValue::toString() about 2 ms per iteration. So it is about 3.5% speed gain in a simple benchmark like this:
{
    QScriptValue v(112312.234334);
    QBENCHMARK {
      v.toString();
    }
}
Comment 2 WebKit Commit Bot 2010-03-07 00:16:17 PST
Comment on attachment 50008 [details]
Fix v1

Clearing flags on attachment: 50008

Committed r55634: <http://trac.webkit.org/changeset/55634>
Comment 3 WebKit Commit Bot 2010-03-07 00:16:21 PST
All reviewed patches have been landed.  Closing bug.