[Top][All Lists]

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

Re: [gpsd-dev] register keyword?

From: Gary E. Miller
Subject: Re: [gpsd-dev] register keyword?
Date: Mon, 22 Jan 2018 15:16:57 -0800

Yo Hal!

On Mon, 22 Jan 2018 14:32:25 -0800
Hal Murray <address@hidden> wrote:

> address@hidden said:
> >> Is there still a reason to keep the register keyword in gpsd?  
> > Maybe.  It is in the critical path of some time measurements.  
> Do modern compilers pay attention to it?

The C11 standard states:

"A declaration of an identifier for an object with storage-class
specifier register suggests that access to the object be as fast as
possible.  The extent to which such suggestions are effective is

Does gcc, llvm, or any other compiler use it?  Dunno.  Someone should

Does it make a measureable difference when used?  Dunno.  Someone should

At one point, someone thought the register keyword made a difference.
There is no obvious win to removing it.  Until someone measures it, I'd
         Ain't brokem don't fix it.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin

Attachment: pgpWItHqVrBId.pgp
Description: OpenPGP digital signature

reply via email to

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