Skip to content

add qoi-rs benchmark#33

Merged
kodonnell merged 2 commits intokodonnell:mainfrom
Joshix-1:main
Jan 1, 2026
Merged

add qoi-rs benchmark#33
kodonnell merged 2 commits intokodonnell:mainfrom
Joshix-1:main

Conversation

@Joshix-1
Copy link
Copy Markdown
Contributor

Made my one library because I'm not in the numpy ecosystem and wanted an alternative using more normal python datatypes. Performance seems to be similar.

Test image Method Format Input (kb) Encode (ms) Encode (kb) Decode (ms) SSIM
all black ('best' case) PIL jpg @ 80 6075.0 2.26 32.5 2.52 1.00
all black ('best' case) PIL png 6075.0 16.44 6.0 10.51 1.00
all black ('best' case) opencv jpg @ 80 6075.0 2.10 32.5 1.97 1.00
all black ('best' case) opencv png 6075.0 8.82 7.7 12.65 1.00
all black ('best' case) qoi qoi 6075.0 2.08 32.7 1.23 1.00
all black ('best' case) qoi-lossy-0.50x0.50 qoi 6075.0 0.92 8.2 0.92 1.00
all black ('best' case) qoi_rs qoi 6075.0 1.91 32.7 0.88 1.00
koi photo PIL jpg @ 80 6075.0 3.47 274.6 5.34 0.94
koi photo PIL png 6075.0 638.59 2821.5 35.79 1.00
koi photo opencv jpg @ 80 6075.0 2.99 275.3 3.62 0.94
koi photo opencv png 6075.0 44.85 3121.5 21.84 1.00
koi photo qoi qoi 6075.0 13.93 3489.0 9.40 1.00
koi photo qoi-lossy-0.50x0.50 qoi 6075.0 3.85 980.1 2.86 0.95
koi photo qoi_rs qoi 6075.0 10.78 3489.0 7.34 1.00
random noise (worst case) PIL jpg @ 80 6075.0 6.46 1351.6 11.66 0.55
random noise (worst case) PIL png 6075.0 160.09 6084.5 21.63 1.00
random noise (worst case) opencv jpg @ 80 6075.0 6.13 1351.7 9.75 0.55
random noise (worst case) opencv png 6075.0 29.66 6086.9 7.45 1.00
random noise (worst case) qoi qoi 6075.0 8.46 8096.0 4.73 1.00
random noise (worst case) qoi-lossy-0.50x0.50 qoi 6075.0 2.54 2019.1 2.23 0.24
random noise (worst case) qoi_rs qoi 6075.0 7.94 8096.0 3.36 1.00

@kodonnell
Copy link
Copy Markdown
Owner

kodonnell commented Oct 22, 2025

Cool! What OS are you running on? Yours was slightly faster on those tests, whereas when I run it (WSL2 Windows 11 i7-12700H, conda environment) it's slightly slower as below. (EDIT: sorry, only skimmed table. Looks similar, with yours generally having a slight edge)

Test image Method Format Input (kb) Encode (ms) Encode (kb) Decode (ms) SSIM
all black ('best' case) PIL jpg @ 80 6075.0 3.49 32.5 4.08 1.00
all black ('best' case) PIL png 6075.0 18.20 6.0 5.20 1.00
all black ('best' case) opencv jpg @ 80 6075.0 2.49 32.5 2.62 1.00
all black ('best' case) opencv png 6075.0 9.75 7.7 8.23 1.00
all black ('best' case) qoi qoi 6075.0 3.00 32.7 1.94 1.00
all black ('best' case) qoi-lossy-0.50x0.50 qoi 6075.0 1.23 8.2 1.25 1.00
all black ('best' case) qoi_rs qoi 6075.0 3.14 32.7 0.97 1.00
koi photo PIL jpg @ 80 6075.0 5.92 274.6 8.41 0.94
koi photo PIL png 6075.0 700.26 2821.5 53.39 1.00
koi photo opencv jpg @ 80 6075.0 4.43 275.3 6.80 0.94
koi photo opencv png 6075.0 57.41 3121.5 33.62 1.00
koi photo qoi qoi 6075.0 17.96 3489.0 12.55 1.00
koi photo qoi-lossy-0.50x0.50 qoi 6075.0 5.55 980.1 3.46 0.95
koi photo qoi_rs qoi 6075.0 15.91 3489.0 10.48 1.00
random noise (worst case) PIL jpg @ 80 6075.0 9.17 1351.5 15.91 0.55
random noise (worst case) PIL png 6075.0 148.40 6084.5 38.38 1.00
random noise (worst case) opencv jpg @ 80 6075.0 9.51 1351.5 13.91 0.55
random noise (worst case) opencv png 6075.0 34.48 6086.9 9.71 1.00
random noise (worst case) qoi qoi 6075.0 12.73 8096.0 5.40 1.00
random noise (worst case) qoi-lossy-0.50x0.50 qoi 6075.0 3.50 2019.1 2.46 0.24
random noise (worst case) qoi_rs qoi 6075.0 12.82 8096.0 4.57 1.00

Re merging, I was going to but had a look at https://github.com/phoboslab/qoi and there are 3 other python libs (not including yours), so if I was going to include yours I should probably include theirs. Thoughts?

@Joshix-1
Copy link
Copy Markdown
Contributor Author

I'm running on native Arch Linux.

Aren't the other libraries written in python? I doubt they have similar performance. I don't really care if you merge this, or add the others. I just was curious and added my library to your benchmark, and thought I could share it.

@kodonnell kodonnell merged commit d1f992e into kodonnell:main Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants