|
|
Created:
4 years, 8 months ago by hal.canary Modified:
4 years, 8 months ago CC:
reviews_skia.org Base URL:
https://skia.googlesource.com/skia.git@master Target Ref:
refs/heads/master Project:
skia Visibility:
Public. |
DescriptionSkWStream::writeText inlined.
Motivation: This function is used throughout SkPDF.
Note that the compiler can usually inline the result of strlen() for literal strings.
Before:
out/Release/nanobench -m WStreamWriteText -q
Timer overhead: 24.2ns
! -> high variance, ? -> moderate variance
micros bench
6.10 WStreamWriteText nonrendering
After:
out/Release/nanobench -m WStreamWriteText -q
Timer overhead: 23.9ns
! -> high variance, ? -> moderate variance
micros bench
2.51 WStreamWriteText nonrendering
PDF runtime change: -0.8% ±0.04%.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1844343004
Committed: https://skia.googlesource.com/skia/+/cbc060a70007bcdcc180d74b552f30104c88a805
Patch Set 1 #
Total comments: 1
Messages
Total messages: 20 (10 generated)
Description was changed from ========== SkWStream::writeText inlined. Motivation: This function is used throughout SkPDF. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering ========== to ========== SkWStream::writeText inlined. Motivation: This function is used throughout SkPDF. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&is... ==========
Description was changed from ========== SkWStream::writeText inlined. Motivation: This function is used throughout SkPDF. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&is... ========== to ========== SkWStream::writeText inlined. Motivation: This function is used throughout SkPDF. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&is... ==========
halcanary@google.com changed reviewers: + bungeman@google.com, reed@google.com
PTAL
Description was changed from ========== SkWStream::writeText inlined. Motivation: This function is used throughout SkPDF. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&is... ========== to ========== SkWStream::writeText inlined. Motivation: This function is used throughout SkPDF. Note that the compiler can usually inline the result of strlen() for literal strings. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&is... ==========
lgtm https://codereview.chromium.org/1844343004/diff/1/include/core/SkStream.h File include/core/SkStream.h (right): https://codereview.chromium.org/1844343004/diff/1/include/core/SkStream.h#new... include/core/SkStream.h:205: return this->write(text, strlen(text)); The win here appears to be mostly that the compiler can now pre-compute strlen(text) when text is a compile time constant string.
The CQ bit was checked by bungeman@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1844343004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1844343004/1
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
How does this change affect the speed of generating a PDF doc, not just this nanobench?
On 2016/04/02 14:02:17, reed1 wrote: > How does this change affect the speed of generating a PDF doc, not just this > nanobench? That's much harder to measure, due to the high variance. After some experiments with dm, I get a run time delta of -0.8%±0.04%.
Description was changed from ========== SkWStream::writeText inlined. Motivation: This function is used throughout SkPDF. Note that the compiler can usually inline the result of strlen() for literal strings. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&is... ========== to ========== SkWStream::writeText inlined. Motivation: This function is used throughout SkPDF. Note that the compiler can usually inline the result of strlen() for literal strings. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering PDF runtime change: -0.8% ±0.04%. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&is... ==========
Description was changed from ========== SkWStream::writeText inlined. Motivation: This function is used throughout SkPDF. Note that the compiler can usually inline the result of strlen() for literal strings. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering PDF runtime change: -0.8% ±0.04%. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&is... ========== to ========== SkWStream::writeText inlined. Motivation: This function is used throughout SkPDF. Note that the compiler can usually inline the result of strlen() for literal strings. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering PDF runtime change: -0.8% ±0.04%. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&is... ==========
On 2016/04/05 18:06:31, Hal Canary wrote: > On 2016/04/02 14:02:17, reed1 wrote: > > How does this change affect the speed of generating a PDF doc, not just this > > nanobench? > > That's much harder to measure, due to the high variance. > > After some experiments with dm, I get a run time delta of -0.8%±0.04%. (That's a ~1% improvement; let's land.)
api lgtm
The CQ bit was checked by halcanary@google.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1844343004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1844343004/1
Message was sent while issue was closed.
Description was changed from ========== SkWStream::writeText inlined. Motivation: This function is used throughout SkPDF. Note that the compiler can usually inline the result of strlen() for literal strings. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering PDF runtime change: -0.8% ±0.04%. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&is... ========== to ========== SkWStream::writeText inlined. Motivation: This function is used throughout SkPDF. Note that the compiler can usually inline the result of strlen() for literal strings. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering PDF runtime change: -0.8% ±0.04%. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&is... Committed: https://skia.googlesource.com/skia/+/cbc060a70007bcdcc180d74b552f30104c88a805 ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1) as https://skia.googlesource.com/skia/+/cbc060a70007bcdcc180d74b552f30104c88a805 |