[PATCH 3/3] winex11: Use TINN algorithm to speed up colour lookups. (try 2)

Dmitry Timoshkov dmitry at codeweavers.com
Tue May 8 01:38:28 CDT 2007

"Vitaly Budovski" <vbudovski at gmail.com> wrote:

> Both floats and integers have their share of problems. Since the square
> root operation has been removed, we are dealing with much larger
> numbers, potentially larger than can fit into unsigned int without
> looping back around. This is why I think keeping distances as floats is
> a good idea, since they can represent a much larger range of values.

Not really. sizeof(float) == 4, i.e. same as sizeof(int), but a float
type carries much more information, therefore can't "deal with much
larger numbers".

> As
> I mentioned earlier, there is no noticeable performance difference
> between using floats and integers (cheap operations +-*) for the
> distances so I really don't see the reason for all the resistance.

Even if it looks like a "cheap" operation, floating point operations
are much slower than an integer ones.


More information about the wine-devel mailing list