bug-gperf
[Top][All Lists]
Advanced

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

Re: [bug-gperf] unsigned long vs. unsigned int


From: Bruno Haible
Subject: Re: [bug-gperf] unsigned long vs. unsigned int
Date: Thu, 05 Sep 2019 01:58:22 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-159-generic; KDE/5.18.0; x86_64; ; )

Hello Mark,

> SECOND SUGGESTION ( EASY )
> 
>   With 64 bit machines, "unsigned long" is probably more efficient to pass
> around than "unsigned int". An option   --return_type = "unsigned int"
> with --return_type = "unsigned long" could be helpful.

'unsigned long' is generally faster to access and move around on 64-bit
machines than 'unsigned int'.

Since version 3.1, the string length parameter in gperf-generated code is
'size_t', which on 64-bit platforms (excluding native Windows) is equivalent
to 'unsigned long'.

What other opportunities to use 'unsigned long' do you see?

Bruno




reply via email to

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