macluvitch said:
Sorry teacher
I meant by ie: ? (For example)
A coherent example that shows the use of a register variable
did u anderstand ?
This was in response to something posted about 4 days ago. You can't
reasonably expect us to remember the context. It's seldom necessary
to quote the entire article to which you're responding (unless it's
fairly short), but it's very helpful to provide *some* context.
(Incidentally, "i.e." means "that is" (Latin "id est"); "e.g." means
"for example" (Latin "exempli gratia").)
This is an international forum. We do use some jargon here, but
you'll find it much easier to communicate if you write in complete
words and complete sentences. The use of 'u' rather than 'you' is
particularly frowned upon, for reasons I won't get into.
In response to what I think your actual question was, there's probably
no good use these days for register variables. The original intent of
the "register" keyword was to provide a hint to the compiler that a
given variable is going to be used heavily, and that it would be
beneficial to store it in a CPU register rather than in main memory
(and that its address will never be taken). Modern compilers are
likely to be able to figure this out for themselves; you'll get a much
better performance improvement by adding "-O3" or equivalent to your
compiler's command line than by tweaking the source. The common
wisdom is that adding "register" keywords is more likely to hinder the
compiler's optimization than to help it; I don't know how accurate
that is.