freetype-devel
[Top][All Lists]
Advanced

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

Re: Logging Library-GSOC


From: Priyesh kumar
Subject: Re: Logging Library-GSOC
Date: Thu, 16 Jul 2020 12:51:21 +0530

> Have you set `FT2_DEBUG=any:7` in the environment?

Sorry, I forgot to mention this, I have used FT2_DEBUG=any:7 with OpenSans-Bold.ttf font.

> You should also use a
> well-hinted TrueType font like 'Arial' to get a large bunch of
> instruction debugging.


Thanks, I will use this font.
Also, I wanted to ask is this the right approach for profiling?

Thanks,
Priyesh

On Thu, Jul 16, 2020 at 12:18 PM Werner LEMBERG <wl@gnu.org> wrote:

> I was trying profiling on the example program given @ here
> <https://www.freetype.org/freetype2/docs/tutorial/example1.c>.  I
> have used the profiling tool inbuilt in Visual Studios but was
> unable to extract useful information from it, therefore I have tried
> a solution provided on Stack Overflow @ here
> <https://stackoverflow.com/questions/5248915/execution-time-of-c-program>
> .  It basically uses `clock()` function to calculate the running
> time of the program.

OK.

> So, basically I have used two variables of type *time_t *one at the
> start and one at the end of the program marking the clock time at
> those steps and in the end the program prints the time taken by the
> program in seconds.  For averaging out the result I have used a *for
> *loop running the example code 10 times every time the code is is
> executed and at the end of each iteration it writes the difference
> between the start time and end time to a file in seconds.
>
> I have attached the file in which it writes the results.

Well, those numbers vary far too much to have any significance.  I can
only see that an execution without debugging is faster.  Have you set
`FT2_DEBUG=any:7` in the environment?  This will make FreeType very
chatty and thus should give better numbers.  You should also use a
well-hinted TrueType font like 'Arial' to get a large bunch of
instruction debugging.


    Werner

reply via email to

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