freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Discrepancy in FT_MulFix macros and int sizes


From: Alexei Podtelezhnikov
Subject: Re: [ft-devel] Discrepancy in FT_MulFix macros and int sizes
Date: Wed, 19 Nov 2014 08:23:54 -0500

On Wed, Nov 19, 2014 at 12:32 AM, Werner LEMBERG <address@hidden> wrote:
>
>> I was also wondering if FT_Long should be defined synonymous to
>> FT_Int32, etc.
>>
>>   typedef FT_Long FT_Int32
>
> Hmm.  FT_Int32 is *exactly* 32bit, while FT_Long is simply a typedef
> to `long' and thus *at least* 32bit, depending on the compiler and/or
> platform.
>
> On 64bit platforms I think that compilers produce more efficient code
> for the latter.

I run freetype on x86-64/linux with 64-bit long and 32-bit int. I was
taught that 'int' is the most natural and efficient integer type. The
memory footprint using long is obviously larger. I did not measure if
long is slower. On paper (https://gmplib.org/~tege/x86-timing.pdf),
the difference is tiny.



reply via email to

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