Files
serenity/Userland
Nico Weber 787c439271 LibGfx/CCITT: Make decoding of wide ccitt3-2d and ccitt-4 images faster
`take_first()` on a Vector is O(n), meaning this function used to have
O(n^2) behavior in the width of an image.

We can just use a span instead, which can be be advanced in O(1) time.

Makes

    pdf --debugging-stats ~/Downloads/ignition.pdf

go from 10.2s to 6.7s, 34% faster.

Makes the first 50 pages of

    pdf --debugging-stats pdf-stuff/Mellor_ACTITC_10.pdf

go from 65.9s to 13.2s, 80% faster.

Fixes #26082.
2025-07-31 14:59:21 -04:00
..