Changes

Jump to: navigation, search

Kraken Info

296 bytes added, 02:53, 17 November 2010
imaging-desaturate
It iterates through each pixel, setting the R/G/B values all to the the same value, which is a function of the prior R/G/B values.
This desaturation loop is repeated 200 times. The first time the desaturation loop runs, the (R, G, B) values are converted from integers to doubles. The remaining 199 times, the values are doubles to begin with, and so the fragment always side-exits to a secondary fragment. Avoiding this (type inference?) would make a big difference, because (a) the GETELEM we abort on has to be repeated, and (b) the code in the secondary fragment is worse because CSE does less because it has less context to work with.
The program is kind of stupid for (a) not truncating the desaturated R/G/B values and (b) desaturating the image 200 times in a row. Indeed, the benchmarks admits as much for (b):
Confirm
1,345
edits

Navigation menu