You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pushing the zero-initialization into the sk_malloc_etc call can be more
efficient than a two-step malloc-and-then-memset, e.g. if the memory
allocator gives us something from an already-known-zeroed region.
Some microbenchmark numbers (milliseconds per decode) from running
Chromium's image_decode_bench program on a few GIF files:
Before After Ratio Filename Width x Height = Pixels
0.109 0.107 1.02 hat.gif 90 x 112 = 10080
7.062 6.879 1.03 harvesters.gif 1165 x 859 = 1000735
33.342 30.544 1.09 droids.gif 2560 x 1920 = 4915200
Ratio > 1.00 means a performance improvement.
image_decode_bench comes from:
https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/testing/image_decode_bench.cc
hat.gif and harvesters.gif come from:
https://github.com/google/wuffs/tree/master/test/data
droids.gif comes from:
https://cs.chromium.org/chromium/src/third_party/blink/perf_tests/image_decoder/resources/
These are x86_64 Broadwell numbers. I don't have ARM numbers readily
available, but nothing about this commit should be arch-specific.
Bug: skia:8235
Change-Id: Icf45b7ac5b7194eaab455628e44d4aedf30ddbfe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254836
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
0 commit comments