Re: Experiences using "register"



Ioannis Vranos <ivranos@xxxxxxxxxxxxxxxxxxxxxxxxx> writes:

Willem wrote:
Ioannis wrote:
) Yes, what I am saying about "register" and small scopes is a general
) good practice.

But are you saying that using "register" in small scopes
is the only 'proper use' ? And that using it in larger
scopes is therefore 'improper use' ?


I am saying that using "register" in small scopes is a general good
practice when using this keyword, the same way as using "inline" with
small functions is a general good practice.


Naturally there are exceptions to these rules.

An exception example for "register" is when we want a specific portion
of code to run as fast as possible without caring about run-time
efficiency of the rest of the code because of this.

Now you're talking at odds. One part can not be efficient and the rest
inefficient if its all mixed up and in the same thread.

Bottom line is that it depends on the circumstances. There are many
"large" functions which, if its a poor compiler, would benefit from
register on a variable used through out that large function.


An exception example for "inline" is when we want a large function with
many calls to be called as fast as possible, without caring about space
efficiency.

Which is rare especially if paging happens as a result of the code
increase.

Large functions are rarely called frequently enough to have the overhead
of the call/return to have any noticeable impact.

.



Relevant Pages

  • Re: Experiences using "register"
    ... what I am saying about "register" and small scopes is a general ... good practice. ...
    (comp.lang.c)
  • Re: Experiences using "register"
    ... what I am saying about "register" and small scopes is a general ... You all think I'm paranoid, ...
    (comp.lang.c)
  • Re: Representative democracy
    ... and the former residents of my new address will drop off too. ... In theory but in practice it's easy for the forms to get muddled up, ... With my canvasser's hat on there are certainly entries on the register best ... family or have several different surnames, ...
    (uk.politics.electoral)
  • Re: Burkes International REegister of Arms
    ... nonsense surfaces again in the Burke's Register! ... Are you saying that the NN may surface again generally or are you ... An online publication uncritically reproducing debatable arms and an unproven pedigree, as in the McShane-Johnson case under discussion, is very much to be regretted. ...
    (rec.heraldry)
  • Re: "When God Made Me" ~ Neil Young song ?
    ... > aural perceptions that didn't quite register at the conscious level ... > people needed killing? ... No, I'm not saying I'm special, if you're implying that I'm saying that. ...
    (rec.music.artists.springsteen)