[webkit-reviews] review granted: [Bug 41238] RegExp performance slow on Dromaeo benchmark : [Attachment 60039] Latest revised patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 29 11:40:52 PDT 2010


Darin Adler <darin at apple.com> has granted Michael Saboff <msaboff at apple.com>'s
request for review:
Bug 41238: RegExp performance slow on Dromaeo benchmark
https://bugs.webkit.org/show_bug.cgi?id=41238

Attachment 60039: Latest revised patch
https://bugs.webkit.org/attachment.cgi?id=60039&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
ChangeLog was mismerged here. This removed some change log entries. Because of
that, I set commit-queue- on this patch.

> +	   if (size1 == 0)
> +	       return true;

One strange thing about WebKit style is that we write such this as:

    if (!size1)
	return true;

And the style bot is telling you about that.

> -	       return s2.size() == size && memcmp(s1.data(), s2.data(), size *
sizeof(UChar)) == 0;
> +	       return memcmp(d1, d2, size1 * sizeof(UChar)) == 0;

The style bot has the same complaint on the existing code on this line (not
something you added). I personally think memcmp is an exception. I find it
easier to read calls to memcmp and strcmp if there is an "== 0" to mean "==" or
"!= 0" to mean "!=" or even "< 0" to mean "<".

r=me as is if we fix the change log before committing, but you could consider
using !size1 to make the style bot happy


More information about the webkit-reviews mailing list