Post

How about replacing sRGB/linear conversions with simple square & sqrt(x)? I'd guess that for these kind of images the difference will be very minimal, but the code will be smaller (no tables) and probably as fast. And easier to apply SIMD.

I don't have experience with this but I'm very curious since you also mentioned it in your blog post; is it possible to write Kotlin code that makes use of SIMD at all? Or does that necessary require to drop down into native code via NDK?

One option would be to use Kotlin-native, tweak the code and check the result. In Java you can soon use vectorization (JEP-448) and do everything more easily, especially powerful if you combine it with Graal native compilation and their inferred optimizations.