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: Anuj Verma
Subject: Re: [Freetype-devel] Re: GSOC - Distance Fields
Date: Mon, 15 Jun 2020 10:02:19 +0530

> I am asking you to do some performance analysis. Specifically, would
> you please profile a curve and a straight segment to compare?

Sure, here is the average of 1 million iteration of computing shortest
distance from a point to both types of curves and line segments:
(using -O3 optimization, measured using chrono library)

A) Line Segment: ~0.32 microseconds
B) Conic Bezier: ~1.08 microseconds
C) Cubic Bezier: ~1.25 microseconds

[I have also attached the gprof output in case you are interested. Note
that the gprof output is without any compiler optimization]

> We need to know if it is worth simply splitting the curve into a large
> number of straight segments. How many straight segments we can afford
> and still beat the exact solution.

In my opinion it's not worth splitting the curves into line segments.
But if there is a way to not check each and every line segment, then
it might be worth giving it a try.

> Sure, but please use your dedicated branch.

Yes, I will do that.

Anuj

Attachment: cubic.txt
Description: Text document

Attachment: line.txt
Description: Text document

Attachment: qadratic.txt
Description: Text document


reply via email to

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