[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] fttrigon: Use standard floating-point functions for perfo

From: Alexei Podtelezhnikov
Subject: Re: [ft-devel] fttrigon: Use standard floating-point functions for performance?
Date: Tue, 27 May 2014 10:18:07 -0400

Hi Rodger,

Your tests show that Freetype stroker relies on

On Sat, May 24, 2014 at 12:49 AM, Rodger Combs <address@hidden> wrote:
While profiling libass in OSX's, I've found that Freetype's stroker tends to come up as a very time-consuming routine, and that most of the time spent in the stroker is in the trigonometry routines; specifically, the atan2 and cosine functions seem rather slow.

You have shown that Freetype's stroker makes too many calls to trigonometric functions. This is true. It could be reimplemented with no trigonometric calls at all. We used to have emboldener rely on trigonometry too much; now it does not make a single trigonometric call. I meant to start working on it but life set different priorities. Some day I'll merge both features.
While it most likely makes sense to leave the current fixed-point trigonometry in place for the sake of systems with slow (or no) FPU, it seems apparent to me that floating-point versions should be used when compiling for modern processors.

Trigonometry is used very sparsely in Freetype, except in the stroker. I dare you to find a different benchmark to show that trigonometry is a drag somewhere else. So I still prefer fixing the stroker to changing Freetype to use the FPU trigonometry.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]