Optimize jpeg decoder based on traces.#1303
Merged
JimBobSquarePants merged 3 commits intomasterfrom Aug 4, 2020
Merged
Conversation
| public class DecodeJpegParseStreamOnly | ||
| { | ||
| [Params(TestImages.Jpeg.Baseline.Jpeg420Exif)] | ||
| [Params(TestImages.Jpeg.BenchmarkSuite.Lake_Small444YCbCr)] |
Member
Author
There was a problem hiding this comment.
Updated to match the full decoding benchmark so we can more easily see the difference.
Codecov Report
@@ Coverage Diff @@
## master #1303 +/- ##
==========================================
- Coverage 82.79% 82.77% -0.03%
==========================================
Files 689 689
Lines 30731 30733 +2
Branches 3472 3473 +1
==========================================
- Hits 25444 25439 -5
- Misses 4581 4587 +6
- Partials 706 707 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
antonfirsov
requested changes
Aug 3, 2020
Co-authored-by: Anton Firszov <antonfir@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
I ran a trace against the decoder after reading this benchmark here (which we're doing really well with IMO) and thought I'd clean up some low hanging fruit. Shaved a few percent of the decoding benchmarks.
Decode
Adds hardware accelerated rounding to
SimdUtils.FastRound.Before and after performance traces.


Scan Only

Slight refactor of
HuffmanScanBuffer.DecodeHuffmanto remove double lookup on slow path. There's now nothing that stands out here.