freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] benchmark of sfnt checksum recalculation


From: mpsuzuki
Subject: [ft-devel] benchmark of sfnt checksum recalculation
Date: Sat, 30 Apr 2011 01:18:10 +0900

On Thu, 28 Apr 2011 19:07:22 +0900
address@hidden wrote:
>Anyway, my assumption might be wrong. I should check the
>cost of checksum recalculation by some benchmarks...

Now I started the preliminary benchmark test about the
extra latency when we ignore predefined checksums and
calculate them by ourselves.

It seems that the extra latency of checksum recalculation
in FT_New_Face() is not fatal. The proportion to load/
validate hmtx, cmap tables is far larger.

However, the latency is dependent with the size of cvt/
fpgm/prep tables, more detailed discussion is needed.

Regards,
mpsuzuki


TESTCASE 1)
===========

Environment is following:
CPU:    Centrino Duo
RAM:    2GB
FreeType2 configuration:
        env \
        CFLAGS="-g3 -ggdb -p -pg -fkeep-inline-functions -DFT_DEBUG_MEMORY=7" \
        ./configure --disable-shared
Fonts:
        Arphic (Taiwanese) TrueType fonts in Debian package
        bkai00mp.ttf, bsmi00lp.ttf,
        gbsn00lp.ttf, gkai00mp.ttf,
        ukai.ttc, uming.ttc
Benchmark:
        repeat FT_New_Face() and FT_Done_Face() by sample program (attached)
        all sample fonts are opened/closed 1000 times.

Profile result
--------------
Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  ms/call  ms/call  name    
 27.08      5.24     5.24    12000     0.44     0.44  tt_face_load_hmtx
 18.76      8.87     3.63 13920000     0.00     0.00  FT_Stream_ReadFields
  9.56     10.72     1.85 55404000     0.00     0.00  FT_Stream_GetUShort
  7.86     12.24     1.52     8000     0.19     0.19  tt_cmap4_validate
  6.30     13.46     1.22 33448000     0.00     0.00  FT_Stream_GetULong
  6.10     14.64     1.18 27927000     0.00     0.00  FT_Stream_EnterFrame
  4.86     15.58     0.94     6000     0.16     1.75  tt_face_load_eblc
  4.19     16.39     0.81     4000     0.20     0.20  tt_cmap12_validate
  3.98     17.16     0.77 13552000     0.00     0.00  FT_Stream_ReadULong
  2.43     17.63     0.47     6000     0.08     0.11  tt_face_free_eblc
  1.65     17.95     0.32 13839000     0.00     0.00  Load_SBit_Range
  1.55     18.25     0.30 27907000     0.00     0.00  FT_Stream_ExitFrame
  1.40     18.52     0.27 13992000     0.00     0.00  FT_Stream_Seek
  0.88     18.69     0.17 28088086     0.00     0.00  ft_mem_free
  0.67     18.82     0.13 13534000     0.00     0.00  Load_SBit_Const_Metrics

[snip]

  0.00     19.35     0.00    12000     0.00     0.00  tt_face_load_hhea
  0.00     19.35     0.00     8000     0.00     0.00  tt_get_sfnt_checksum
  0.00     19.35     0.00     8000     0.00     0.00  tt_synth_sfnt_checksum
  0.00     19.35     0.00     6000     0.00     0.00  tt_check_trickyness
  0.00     19.35     0.00     6000     0.00     0.00  tt_check_trickyness_family
  0.00     19.35     0.00     6000     0.00     0.00  
tt_check_trickyness_sfnt_ids

[snip]

Attachment: repeat-new-done.c
Description: Text Data


reply via email to

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