Closed ProkopRandacek closed 1 year ago
Sorry for the delay. While the decode performance improvement is quite substantial (at least for those images with many runs) I'm not a fan of having the pixel assignment in two different places now. Faster implementations already exist and I think this particular implementation's goal should be readability.
restrict
is sadly a C99 thing and qoi.h aims to support c89.
Hi :D I split up the main decode loop into two loops - one for the run op filling and one for the rest.
./qoibench 10 ~/Downloads/images/ --noencode --onlytotals --nopng
Original:+ separate run loop
+ restrict pointers
The restrict pointers didn't gain any noticible speedup but I have noticed on compiler explorer that the compiler couldn't eliminate some loads because void* could alias with the other pointers, which the restricts solved.