Closed runfalk closed 7 years ago
I see only a very slight performance improvement from this. 10ms in total perhaps. It still makes sense to do it though. I did have a suspicion that this allowed an extra optimization which was to replace buf.colors
with 3
in src/imageops/transform.rs
now that we know that the buffer is always 3 channels. That's about an 80ms speedup, want to add that commit to this PR?
Since a rewrite of rotate_buffer
is in the works I'd prefer to just merge this as it is.
Sounds good then. Just remember on the rewrite that you can assume buf.colors == 3
. The optimizer likes to know those things :)
It now operates on 3 rather than 4 channels.