Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Mar 1999 14:30:18 -0500 (EST)
From:      "John S. Dyson" <dyson@iquest.net>
To:        dillon@apollo.backplane.com (Matthew Dillon)
Cc:        andrew@lake.com.au, sjr@home.net, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Use of "register" in code
Message-ID:  <199903161930.OAA08492@y.dyson.net>
In-Reply-To: <199903160814.AAA06956@apollo.backplane.com> from Matthew Dillon at "Mar 16, 99 00:14:30 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon said:
> :I've had to use some pretty ordinary compilers.  They still exist, and
> :are still shipped with new systems.  
> :
> :>     specific processor or compiler - usually the VAX.  As kernel code started
> :>     to migrate to other processors, such optimizations have historically
> :>     produced *WORSE* code on the other processors.  So people stopped using
> :>     'register' and started expecting compilers to optimize it themselves.
> :
> :But how is using 'register' with gcc in FreeBSD going to make
> :performance _worse_, given that gcc is quite happy to move register
> :variables to and from the stack?
> :
> :I'll shut up now.
> :
> :-- 
> :Andrew
> 
>     I doubt it would make performance worse.  I think GCC basically just
>     ignores it for IA32.
>
It does ignore it.  The justification is because the compiler knows more
about temporaries and other usage than the programmer.  Most of the time
(but not all of the time), that is true.

-- 
John                  | Never try to teach a pig to sing,
dyson@iquest.net      | it makes one look stupid
jdyson@nc.com         | and it irritates the pig.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903161930.OAA08492>