[Lazarus] UTF8LengthFast returning incorrect results on AARCH64 (MacOS)

Florian Klämpfl florian at freepascal.org
Tue Dec 28 15:31:05 CET 2021


Am 28.12.2021 um 15:01 schrieb Bart via lazarus:
> On Tue, Dec 28, 2021 at 2:46 PM Marco van de Voort via lazarus
> <lazarus at lists.lazarus-ide.org> wrote:
> 
> 
>> You need an appropriate minimal CPU with -Cp
>>
>>
>> Try e.g. -Cpcoreavx  for core 3000 series and higher
> 
> Thanks for that.
> 
> Up to PENTIUMM: PopCnt slower
> COREI : approximately equally fast
> COREAVX PopCnt slightly faster
> COREAVX2 PopCnt slightly faster
> 
> Most likely not worth bothering.
> In code can we check (at compile time) for which instructionset the
> code was compiled?
> 

For X86, check for the define CPUX86_HAS_POPCNT (compile time!).


More information about the lazarus mailing list