[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] benchmark of sfnt checksum recalculation
From: |
mpsuzuki |
Subject: |
Re: [ft-devel] benchmark of sfnt checksum recalculation |
Date: |
Sat, 30 Apr 2011 04:03:51 +0900 |
Here is 2nd testcases checking ca. 1900 fonts (distributed in Debian
GNU/Linux). The cumulative latency is small again, but the average
latency to recalculate the checksum is 0.84 microsec, longer
than the 1st testcase.
0.60 microsec is spent to seek to the table (tt_face_goto_table()), and
0.23 microsec is spent to mathematical work (tt_synth_sfnt_checksum()).
Even if I write faster assembly version for mathematical work,
I cannot reduce the latency to half. The reduction of the
recalculation would be important.
Considering the number of the fonts including cvt/fpgm/prep tables
(or the times to call tricky font checker, 1731), the times to
call checksum calculater (tt_get_sfnt_checksum(), 44) is small.
The table length comparison (in current implementation) before table
checksum comparison is effective to reduce the number of checksum
recalculation.
TESTCASE 2)
===========
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:
1916 fonts (including non-TrueType) in attached list.
1127/1916 fonts have cvt table
1019/1916 fonts have fpgm table
1071/1916 fonts have prep table
Profile result
--------------
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls us/call us/call name
26.37 0.24 0.24 20873 11.50 11.50 FT_Stream_ReadULong
10.99 0.34 0.10 106868 0.94 0.98 FT_Stream_ReadFields
8.79 0.42 0.08 1791 44.67 45.50 tt_face_load_hmtx
7.69 0.49 0.07 1091109 0.06 0.06 FT_Stream_GetUShort
5.49 0.54 0.05 1858500 0.03 0.03 FT_Stream_GetULong
4.40 0.58 0.04 239967 0.17 1.27 Load_SBit_Range
4.40 0.62 0.04 3124 12.80 12.80 tt_cmap4_validate
4.40 0.66 0.04 1731 23.11 23.74 tt_face_load_kern
4.40 0.70 0.04 182 219.78 219.78 tt_cmap12_validate
3.30 0.73 0.03 538286 0.06 0.06 FT_Stream_EnterFrame
3.30 0.76 0.03 1731 17.33 253.10 tt_face_load_eblc
2.20 0.78 0.02 34692 0.58 0.60 tt_face_goto_table
1.65 0.80 0.01 583348 0.03 0.03 ft_mem_free
1.10 0.81 0.01 531236 0.02 0.02 FT_Stream_ExitFrame
1.10 0.81 0.01 277428 0.04 0.04 FT_Stream_Seek
1.10 0.82 0.01 263558 0.04 0.04 ft_mem_alloc
1.10 0.83 0.01 247736 0.04 0.08 ft_mem_realloc
1.10 0.84 0.01 22503 0.44 0.44 ft_service_list_lookup
1.10 0.85 0.01 6925 1.44 1.44 FT_Get_Module
1.10 0.86 0.01 1731 5.78 6.22 cid_get_interface
1.10 0.88 0.01 1731 5.78 52.33 tt_face_build_cmaps
1.10 0.89 0.01 1731 5.78 15.29 tt_face_free_eblc
1.10 0.90 0.01 1731 5.78 5.78 tt_face_free_ps_names
0.55 0.90 0.01 263559 0.02 0.02 ft_free
0.55 0.91 0.01 1731 2.89 2.89 ft_close_stream_by_munmap
[snip]
0.00 0.91 0.00 1731 0.00 0.02 tt_check_trickyness
0.00 0.91 0.00 1731 0.00 0.00 tt_check_trickyness_family
0.00 0.91 0.00 1731 0.00 0.02
tt_check_trickyness_sfnt_ids
[snip]
0.00 0.91 0.00 44 0.00 0.84 tt_get_sfnt_checksum
0.00 0.91 0.00 44 0.00 0.23 tt_synth_sfnt_checksum
0.00 0.91 0.00 35 0.00 0.00 tt_cmap2_validate
- Re: [ft-devel] Registration of a set of trickyfonts by NEC, (continued)
- Re: [ft-devel] Registration of a set of trickyfonts by NEC, Werner LEMBERG, 2011/04/27
- Re: [ft-devel] Registration of a set of trickyfonts by NEC, suzuki toshiya, 2011/04/28
- Re: [ft-devel] Registration of a set of trickyfonts by NEC, Miles Bader, 2011/04/28
- Re: [ft-devel] Registration of a set of trickyfonts by NEC, mpsuzuki, 2011/04/28
- Re: [ft-devel] Registration of a set of trickyfonts by NEC, david.bevan, 2011/04/28
- Re: [ft-devel] Registration of a set of trickyfonts by NEC, Werner LEMBERG, 2011/04/28
- Re: [ft-devel] Registration of a set of trickyfonts by NEC, mpsuzuki, 2011/04/28
- [ft-devel] benchmark of sfnt checksum recalculation, mpsuzuki, 2011/04/29
- Re: [ft-devel] benchmark of sfnt checksum recalculation,
mpsuzuki <=
- Re: [ft-devel] benchmark of sfnt checksum recalculation, Werner LEMBERG, 2011/04/30
- Re: [ft-devel] benchmark of sfnt checksum recalculation, suzuki toshiya, 2011/04/30
- Re: [ft-devel] benchmark of sfnt checksum recalculation, Werner LEMBERG, 2011/04/30
- Re: [ft-devel] Registration of a set of trickyfonts by NEC, suzuki toshiya, 2011/04/28
- Re: [ft-devel] Registration of a set of trickyfonts by NEC, mpsuzuki, 2011/04/30