commit | a5d33b00e277364ba0a49c81d5e4c16c83010f17 | [log] [tgz] |
---|---|---|
author | yiyix <yiyix@chromium.org> | Tue Sep 25 20:15:39 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Sep 25 20:15:39 2018 |
tree | d063adfe0fe82b3312d3c8361121bcb49bd30535 | |
parent | 525b54bb14a47817a32b18a1e0d442e5b77ef0c6 [diff] |
FrameMetrics: Improve SquareRoot calculation Efficiency on Android Enabling FrameMetrics caused 5-20% regression on rendering. (ref: https://bugs.chromium.org/p/chromium/issues/detail?id=876709). One of many reasons is that square root calculation took too long. In this cl, I implemented Newton's method to approximate the square root value. I ran perftest on a Nexus 4 device and got the following result: average of running square_root using std::sqrt: 1601-01-01 00:00:23.160 UTC average of running square_root using fastsqrt: 1601-01-01 00:00:10.629 UTC Conclusion: It's 2.3x faster with newton's approximation instead of standard library. I also ran perftests on linux desktop and got 3%-5% improvements. (perftests ref: https://chromium-review.googlesource.com/c/chromium/src/+/1222676) Bug: 881863 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I5feebc32053650f338a92a2e1db6f4f67b20f995 Reviewed-on: https://chromium-review.googlesource.com/1225105 Commit-Queue: Yi Xu <yiyix@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Reviewed-by: danakj <danakj@chromium.org> Cr-Commit-Position: refs/heads/master@{#594077}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .