Re: Trivial patch reducing fp mults in pango-cairo
- From: Eero Tamminen <ext-eero tamminen nokia com>
- To: ext Jorn Baayen <jorn openedhand com>
- Cc: Behdad Esfahbod <behdad behdad org>, performance-list gnome org
- Subject: Re: Trivial patch reducing fp mults in pango-cairo
- Date: Mon, 11 Dec 2006 10:13:07 +0200
Hi,
ext Jorn Baayen wrote:
Argh! It would have been too simple to be true. The difference in
profiles must be due to general profiling fuzziness.
Is there anymore anything where both what is being calculated and
the result are in integers but they are casted to and multiplied with
floating point values for additional accuracy?
Changing int->double, multiplication, double->int into multiplication
+ divice (i.e. using fractions instead: 1.5*x => 3*x/2) is faster
because converting between floating point and integers are quite
heavy operations.
(One of course needs to select the values for multiplication and
division carefully to avoid overflow.)
- Eero
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]