BitStream: sizes are signed!!!11, sprinkle invariants#613
Merged
Conversation
Again, slight improvement in `BitPumpJPEGBenchmark`,
but otherwise mostly performance-neutral.
```
build-Clang17-release$ /usr/src/googlebenchmark/tools/compare.py -a benchmarks bench/librawspeed/io/BitPumpJPEGBenchmark{-old,} --benchmark_repetitions=9 --benchmark_min_warmup_time=0.5RUNNING: bench/librawspeed/io/BitPumpJPEGBenchmark-old --benchmark_repetitions=9 --benchmark_min_warmup_time=0.5 --benchmark_display_aggregates_only=true --benchmark_out=/tmp/tmpz8tka7pa
2024-01-22T05:11:06+03:00
Running bench/librawspeed/io/BitPumpJPEGBenchmark-old
Run on (32 X 3402.99 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x16)
L1 Instruction 32 KiB (x16)
L2 Unified 512 KiB (x16)
L3 Unified 32768 KiB (x2)
Load Average: 6.12, 5.70, 6.46
---------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations UserCounters...
---------------------------------------------------------------------------------------------------
BM_BitPumpJPEG/Stuffed/16777216_mean 8844 us 8842 us 9 Latency=527.011ps Throughput=1.76727Gi/s
BM_BitPumpJPEG/Stuffed/16777216_median 8823 us 8821 us 9 Latency=525.793ps Throughput=1.77127Gi/s
BM_BitPumpJPEG/Stuffed/16777216_stddev 68.7 us 68.3 us 9 Latency=4.07066ps Throughput=13.7753Mi/s
BM_BitPumpJPEG/Stuffed/16777216_cv 0.78 % 0.77 % 9 Latency=0.77% Throughput=0.76%
BM_BitPumpJPEG/Unstuffed/16777216_mean 8044 us 8040 us 9 Latency=479.248ps Throughput=1.9433Gi/s
BM_BitPumpJPEG/Unstuffed/16777216_median 8045 us 8040 us 9 Latency=479.237ps Throughput=1.94334Gi/s
BM_BitPumpJPEG/Unstuffed/16777216_stddev 1.69 us 2.29 us 9 Latency=136.419fs Throughput=579.907Ki/s
BM_BitPumpJPEG/Unstuffed/16777216_cv 0.02 % 0.03 % 9 Latency=0.03% Throughput=0.03%
RUNNING: bench/librawspeed/io/BitPumpJPEGBenchmark --benchmark_repetitions=9 --benchmark_min_warmup_time=0.5 --benchmark_display_aggregates_only=true --benchmark_out=/tmp/tmpmrvdb0x_
2024-01-22T05:11:40+03:00
Running bench/librawspeed/io/BitPumpJPEGBenchmark
Run on (32 X 3400 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x16)
L1 Instruction 32 KiB (x16)
L2 Unified 512 KiB (x16)
L3 Unified 32768 KiB (x2)
Load Average: 3.85, 5.18, 6.26
---------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations UserCounters...
---------------------------------------------------------------------------------------------------
BM_BitPumpJPEG/Stuffed/16777216_mean 8314 us 8312 us 9 Latency=495.409ps Throughput=1.8801Gi/s
BM_BitPumpJPEG/Stuffed/16777216_median 8283 us 8281 us 9 Latency=493.574ps Throughput=1.8869Gi/s
BM_BitPumpJPEG/Stuffed/16777216_stddev 90.0 us 90.3 us 9 Latency=5.37952ps Throughput=20.3907Mi/s
BM_BitPumpJPEG/Stuffed/16777216_cv 1.08 % 1.09 % 9 Latency=1.09% Throughput=1.06%
BM_BitPumpJPEG/Unstuffed/16777216_mean 7430 us 7427 us 9 Latency=442.694ps Throughput=2.10376Gi/s
BM_BitPumpJPEG/Unstuffed/16777216_median 7430 us 7425 us 9 Latency=442.588ps Throughput=2.10426Gi/s
BM_BitPumpJPEG/Unstuffed/16777216_stddev 7.38 us 7.18 us 9 Latency=427.866fs Throughput=2.07939Mi/s
BM_BitPumpJPEG/Unstuffed/16777216_cv 0.10 % 0.10 % 9 Latency=0.10% Throughput=0.10%
Comparing bench/librawspeed/io/BitPumpJPEGBenchmark-old to bench/librawspeed/io/BitPumpJPEGBenchmark
Benchmark Time CPU Time Old Time New CPU Old CPU New
---------------------------------------------------------------------------------------------------------------------------------------
BM_BitPumpJPEG/Stuffed/16777216_pvalue 0.0004 0.0004 U Test, Repetitions: 9 vs 9
BM_BitPumpJPEG/Stuffed/16777216_mean -0.0599 -0.0600 8844 8314 8842 8312
BM_BitPumpJPEG/Stuffed/16777216_median -0.0612 -0.0613 8823 8283 8821 8281
BM_BitPumpJPEG/Stuffed/16777216_stddev +0.3094 +0.3215 69 90 68 90
BM_BitPumpJPEG/Stuffed/16777216_cv +0.3929 +0.4058 0 0 0 0
BM_BitPumpJPEG/Unstuffed/16777216_pvalue 0.0004 0.0004 U Test, Repetitions: 9 vs 9
BM_BitPumpJPEG/Unstuffed/16777216_mean -0.0764 -0.0763 8044 7430 8040 7427
BM_BitPumpJPEG/Unstuffed/16777216_median -0.0765 -0.0765 8045 7430 8040 7425
BM_BitPumpJPEG/Unstuffed/16777216_stddev +3.3668 +2.1364 2 7 2 7
BM_BitPumpJPEG/Unstuffed/16777216_cv +3.7282 +2.3954 0 0 0 0
OVERALL_GEOMEAN -0.0682 -0.0682 0 0 0 0
```
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.
Again, slight improvement in
BitPumpJPEGBenchmark, but otherwise mostly performance-neutral.