Re: -warmup

2023-08-29 Thread Werner LEMBERG

>> I still think that for such cases the number of iterations of the
>> affected tests should be increased to get more precise values.
>
> the times are for single iteration. (chunk median/chunk size)

Yes, but the number of iterations is the same regardless whether a
test takes 10µs or 1000µs – I suspect that it is necessary to either
increase the number of iterations for the former case or to do bulk
tests.  With 'bulk test' I mean that you don't time single iterations
but do timings for 10 iterations in a group, say, thus avoiding issues
with the granularity of the OS timing functions.

I refuse to believe that we have to live with timing differences of
more than 50%.

BTW, have you checked whether replacing `CLOCK_REALTIME` with
`CLOCK_MONOTONIC` gives better results?

What platform do you actually develop on?  What #if clause in
function `get_time` of `ftbench.c` is run on your computer?


Werner


Re: -warmup

2023-08-29 Thread Ahmet Göksu
> I still think that for such cases the number of iterations of the affected 
> tests should be increased to get more precise values.
the times are for single iteration. (chunk median/chunk size)
> Please separate this line slightly from the rest of the table
> and print the *cumulated timing* (in 's', not 'µs') of all tests,
> something like
i will asap!

Best,
Goksu
goksu.in
On 29 Aug 2023 22:09 +0300, Werner LEMBERG , wrote:
>
> > here is the results with chris’ suggestion. (thanks chris)
>
> Much better, thanks!
>
> > still a bit noise on only load and load_advances. are results
> > acceptable?
>
> As far as I can see, the biggest differences occur if the 'Baseline'
> and 'Benchmark' columns contain very small values. I still think that
> for such cases the number of iterations of the affected tests should
> be increased to get more precise values. Please try that.
>
> Something else: I think that the 'TOTAL' line doesn't make sense right
> now. Please separate this line slightly from the rest of the table
> and print the *cumulated timing* (in 's', not 'µs') of all tests,
> something like
>
> Total duration for all tests: 25.3s
>
> and
>
> Total duration of tests for 'Roboto_subset.ttf: 3.4s
>
>
> Werner


Re: Progress update on adjustment database

2023-08-29 Thread Werner LEMBERG


> As I was testing my attempt at supporting GSUB lookups, I found that
> hb_ot_layout_lookup_collect_glyphs, is actually not what I need,
> because I assumed that each lookup contains exactly one
> substitution, when it actually may contain multiple.  What I really
> need is a way to get each individual substitution.  How do I do
> this?

It's not completely clear to me what you exactly need, please give an
example.

Behdad, any idea whether HarfBuzz can help here?  Otherwise it is
probably necessary to parse the GSUB table by ourselves, which is
something I would like to avoid...


Werner



Re: -warmup

2023-08-29 Thread Werner LEMBERG

> here is the results with chris’ suggestion. (thanks chris)

Much better, thanks!

> still a bit noise on only load and load_advances.  are results
> acceptable?

As far as I can see, the biggest differences occur if the 'Baseline'
and 'Benchmark' columns contain very small values.  I still think that
for such cases the number of iterations of the affected tests should
be increased to get more precise values.  Please try that.

Something else: I think that the 'TOTAL' line doesn't make sense right
now.  Please separate this line slightly from the rest of the table
and print the *cumulated timing* (in 's', not 'µs') of all tests,
something like

  Total duration for all tests: 25.3s

and

  Total duration of tests for 'Roboto_subset.ttf: 3.4s


 Werner


Re: -warmup

2023-08-29 Thread Ahmet Göksu
hi,
here is the results with chris’ suggestion. (thanks chris)
i will check hyperfine.
still a bit noise on only load and load_advances.
are results acceptable?

Best,
Goksu
goksu.in
On 28 Aug 2023 21:19 +0300, Werner LEMBERG , wrote:
>
> code



Freetype Benchmark Results
Warning: Baseline and Benchmark have the same commit ID!
Info

InfoBaselineBenchmark
Parameters-c 750 -w 50-c 750 -w 50
Commit IDf3dfede6f3dfede6
Commit Date2023-08-18 17:42:53 +03002023-08-18 17:42:53 +0300
BranchGSoC-2023-AhmetGSoC-2023-Ahmet
* Average time for single iteration. Smaller values are better.** N count in (x | y) format is for showing baseline and benchmark N counts seperately when they differs.Total Results

TestNBaseline (µs)Benchmark (µs)Difference (%)
Load3750003535.93622.3-2.4
Load_Advances (Normal)3750003057.83133.8-2.5
Load_Advances (Fast)37500010.912.5-14.7
Load_Advances (Unscaled)37500010.010.6-6.0
Render3750004772.24796.7-0.5
Get_Glyph3750003418.73415.20.1
Get_Char_Index3525009.19.10.0
Iterate CMap37506.56.50.0
New_Face3750241.5239.90.7
Embolden3750003798.93780.30.5
Stroke292750 | 28800018049.318067.9-0.1
Get_BBox3750002826.32764.22.2
Get_CBox3750003473.43421.91.5
New_Face & load glyph(s)375000555.6585.6-5.4
TOTAL4402750 | 439800043766.143866.5-0.2

Results for Roboto_subset.ttf

TestN* Baseline (µs)* Benchmark (µs)Difference (%)
Load9583.3575.11.4
Load_Advances (Normal)9487.7503.3-3.2
Load_Advances (Fast)92.64.1-57.7
Load_Advances (Unscaled)92.42.40.0
Render9934.1941.8-0.8
Get_Glyph9582.7597.7-2.6
Get_Char_Index705001.81.80.0
Iterate CMap7501.31.30.0
New_Face75042.541.42.6
Embolden9642.9655.9-2.0
Stroke64008.74043.7-0.9
Get_BBox9167.6139.316.9
Get_CBox9592.1602.3-1.7
New_Face & load glyph(s)9105.0105.00.0
TOTAL20640008154.78215.10.7

Results for Arial_subset.ttf

TestN* Baseline (µs)* Benchmark (µs)Difference (%)
Load71250812.8934.1-14.9
Load_Advances (Normal)71250733.1793.3-8.2
Load_Advances (Fast)712502.02.1-5.0
Load_Advances (Unscaled)712501.91.90.0
Render712501083.01067.41.4
Get_Glyph71250791.0789.80.2
Get_Char_Index705001.81.80.0
Iterate CMap7501.31.30.0
New_Face75051.850.03.5
Embolden71250874.9855.02.3
Stroke570003480.93439.51.2
Get_BBox71250761.9725.24.8
Get_CBox71250815.3787.53.4
New_Face & load glyph(s)71250110.7109.31.3
TOTAL16830009522.49558.20.4

Results for TimesNewRoman_subset.ttf

TestN* Baseline (µs)* Benchmark (µs)Difference (%)
Load71250973.9944.33.0
Load_Advances (Normal)71250876.2859.02.0
Load_Advances (Fast)712502.12.10.0
Load_Advances (Unscaled)712501.91.90.0
Render712501202.71191.11.0
Get_Glyph71250945.6922.52.4
Get_Char_Index705001.81.80.0
Iterate CMap7501.31.30.0
New_Face75053.654.1-0.9
Embolden712501059.51037.22.1
Stroke427504599.44579.50.4
Get_BBox71250895.5887.50.9
Get_CBox71250966.3917.15.1
New_Face & load glyph(s)71250135.2168.5-24.6
TOTAL165450011715.011567.9-1.3

Results for Tahoma_subset.ttf

TestN* Baseline (µs)* Benchmark (µs)Difference (%)
Load71250572.0570.30.3
Load_Advances (Normal)71250469.6525.8-12.0
Load_Advances (Fast)712502.12.10.0
Load_Advances (Unscaled)712501.92.5-31.6
Render71250785.6801.5-2.0
Get_Glyph71250560.0564.4-0.8
Get_Char_Index705001.81.80.0
Iterate CMap7501.31.30.0
New_Face75047.147.10.0