Coding 2025-04-09
Summary of the results of rewriting the dithering:
- Trying to do Fancy Numba Stuff in an Idiomatic Python Way didn't really work out. I still managed to do Fancy Numba Stuff, but I don't like how it looks.
- I had some bad code in the slow version, which Numba caught, and I think fixing that code actually made the slow version a little faster.
- I haven't tested this too much, but compiling then running the jitted code is faster than the faster slow version, and once it's compiled, I saw a speed up in one case of I think like a factor of 15.
So, all in all, this is working out well so far. Unless I'm forgetting something, I guess next I look into blue noise generation. (I guess I should confirm that my rewrites didn't break Bayer dithering first.)
...
Okay, yeah, Bayer dithering is working fine, and when I retested error diffusion, I saw some even more dramatic speedups. So I'm really enjoying the new toy here. Regardless, I need to get to bed right now. I'll try to polish things up a little tomorrow, and then to figure out blue noise.
Good night.