freetype-devel
[Top][All Lists]
Advanced

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

Re: [Freetype-devel] Re: GSOC - Distance Fields


From: Alexei Podtelezhnikov
Subject: Re: [Freetype-devel] Re: GSOC - Distance Fields
Date: Mon, 15 Jun 2020 08:51:46 -0400

Replying to myself...

On Mon, Jun 15, 2020 at 8:11 AM Alexei Podtelezhnikov
<apodtele@gmail.com> wrote:
>
> Hi Anuj,
>
> > A) Line Segment: ~0.32 microseconds
> > B) Conic Bezier: ~1.08 microseconds
> > C) Cubic Bezier: ~1.25 microseconds
> >
>
> I am very surprised indeed. In the linear case, it is a trivial
> cross-product divided by the length of a segment, or the smaller of
> two distances to the ends. There are no equations to solve. What is
> your explanation for such close numbers?

Your profiling results indicate that a lot of time is spent
calculating distances. Perhaps, you can work with much faster
square-distances (they can be signed or signs stored separately) and
apply square root as a final processing step. Or, would signed
square-distance field work as well (SSDF so to speak)? Please spend
some time thinking about optimizations and bottlenecks.

Alexei



reply via email to

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