Take the 2-minute tour ×  Is pointer conversion considered
expensive? (e.g. how many CPU cycles it takes to convert a
pointer/address), especially when you have to do it quite
frequently, for instance (just an example to show the scale of
freqency, I know there are better ways for this particular
cases):  unsigned long long *x; /* fill data to x*/  for (int i
= 0; i < 1000*1000*1000; i++)      A[i]=foo((unsigned
char*)x+i);  share|improve this question Types only exist at
compile-time. That said, these kinds of pointer conversions are
often not a good idea. –  R. Martinho Fernandes Jan 23 '13 at
11:31  4 Answers 4  up vote 6 down vote accepted   In most
machine code languages there is only 1 "type" of pointer and so
it doesn't cost anything to convert between them. Keep in mind
that C++ types really only exist at compile time.  The real
issue is that this sort of code can break strict aliasing rules.
You can read more about this elsewhere, but essentially the
compiler will either produce incorrect code throug