[Fontconfig] MD5 checksum? Why? & mmap alignment on same machine in 32.v.64 mode
Raimund Steger
rs at mytum.de
Mon Jun 23 11:32:15 PDT 2014
On Mon, June 23, 2014 02:05, L. A. Walsh wrote:
> Patrick Lam wrote:
>> (Pedantic: fontconfig isn't object oriented.)
> You mean it is not written in C++?
>
> That doesn't mean it can't be object oriented.
Ah, sweet memories of undergrad CS classes...
> [...]
> It is **faster**, to do
> plain compare than calc an MD5 sum for things This is on *long files*
I think you'd have a hard time even measuring the impact of MD5 in
fontconfig. I just tried with my profiler and it only shows up as 0, where
the whole caching process is usually well in the seconds.
Given all it's fed are a few bytes of pathnames, that's not surprising. To
create a bunch of not-too-long filenames from pathnames, that have a good
chance of not hitting an existing one, I imagine that many other systems
(e. g., HTTP caches...) use something very similar.
About the 32 vs. 64 bit issue, and leaving API considerations aside,
doesn't fontconfig's serialization format use intptr_t sized offsets? If
yes, I think it's not smart to cast these to non-native sizes.
Raimund
--
Worringer Str 31 Duesseldorf 40211 DE home: <rs at mytum.de>
+49-179-2981632 icq 16845346 work: <rs at interface-ag.de>
More information about the Fontconfig
mailing list