[dpdk-dev] [PATCH 0/5] remove usage of register keyword in C
Adrien Mazarguil
adrien.mazarguil at 6wind.com
Tue Jul 31 18:48:40 CEST 2018
On Tue, Jul 31, 2018 at 09:30:54AM -0700, Stephen Hemminger wrote:
> Declaring variables as register in C is a leftover from an earlier
> era (like cassette tape decks in cars).
I don't agree here. It's a hint for compilers and developers that the
address of such variables won't be needed (and cannot be taken) to enable
whatever optimizations are possible knowing this.
Somewhat like inline functions, it's not a forced optimization, just a
useful hint that shouldn't hurt if used wisely.
Besides, cassette decks are not dead yet :)
--
Adrien Mazarguil
6WIND
More information about the dev
mailing list