[webkit-reviews] review granted: [Bug 228052] AirFixObviousSpills should be optimized : [Attachment 442200] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 18 11:52:32 PST 2021
Yusuke Suzuki <ysuzuki at apple.com> has granted Robin Morisset
<rmorisset at apple.com>'s request for review:
Bug 228052: AirFixObviousSpills should be optimized
https://bugs.webkit.org/show_bug.cgi?id=228052
Attachment 442200: Patch
https://bugs.webkit.org/attachment.cgi?id=442200&action=review
--- Comment #6 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 442200
--> https://bugs.webkit.org/attachment.cgi?id=442200
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=442200&action=review
r=me
> Source/JavaScriptCore/b3/air/AirFixObviousSpills.cpp:92
> + // Before we call merge we must make sure that the two
states are sorted.
> + m_state.sort();
Do we need to call `sort()` inside this loop? Can we sort() before starting
this loop?
> Source/JavaScriptCore/b3/air/AirFixObviousSpills.cpp:-568
> + it = std::find_if_not(it, end, [&] (const T& otherAlias)
{
> + return otherAlias < alias;
> + });
> + if (it == end)
> return true;
> - return false;
How about using std::lower_bound or the other binary-searching since other is
also sorted?
More information about the webkit-reviews
mailing list