1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27:45 +00:00

LibPDF: Don't reallocate Vectors in ICCBasedColorSpace all the time

Microoptimization; according to ministat a bit faster:

```
    N           Min           Max        Median         Avg       Stddev
x  50     1.0179932     1.0561159     1.0315337   1.0333617 0.0094757426
+  50      1.000875     1.0427601     1.0208509   1.0201902   0.01066116
Difference at 95.0% confidence
	-0.0131715 +/- 0.00400208
	-1.27463% +/- 0.387287%
	(Student's t, pooled s = 0.0100859)
```
This commit is contained in:
Nico Weber 2024-01-08 20:22:22 -05:00 committed by Sam Atkins
parent 75262a92e1
commit 56a4af8d03
2 changed files with 9 additions and 7 deletions

View file

@ -195,6 +195,8 @@ private:
static RefPtr<Gfx::ICC::Profile> s_srgb_profile;
NonnullRefPtr<Gfx::ICC::Profile> m_profile;
mutable Vector<float, 4> m_components;
mutable Vector<u8, 4> m_bytes;
Optional<Gfx::ICC::MatrixMatrixConversion> m_map;
};