Commit d7878194 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Make UTF16RagelIterator::operator*() to use DCHECK() instead of CHECK()

This patch changes |UTF16RagelIterator::operator*()| to use |DCHECK()| instead
of |CHECK()| for improving performance because this function is called many
times as number of characters in the page.

In text heavy page, I observe 12% speed up.

Change-Id: I5febb53f0f096b3bd76e6330a70b6464b9cb4758
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1760846
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: default avatarDominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688476}
parent 338523ce
...@@ -106,7 +106,7 @@ class PLATFORM_EXPORT UTF16RagelIterator { ...@@ -106,7 +106,7 @@ class PLATFORM_EXPORT UTF16RagelIterator {
} }
UChar32 operator*() { UChar32 operator*() {
CHECK(buffer_size_); DCHECK(buffer_size_);
return cached_category_; return cached_category_;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment