You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi there,
I have been reading the Extreme C book, following paragraph seems to be wrong or unclear(take look at this question ).
Surprisingly, passing the pointer is not efficient in the above example! That's because of the fact that the int type is 4 bytes and copying it is more efficient than copying 8 bytes of its pointer. But this is not the case regarding structures and arrays. Since copying structures and arrays is done byte-wise, and all of the bytes in them should be copied one by one, it is usually better to pass pointers instead.
as I know all the operations in CPU are limited to arithmetic(plus or minus) or bit-wise kind of operation.
and all the copying operations are bitwise at least in new cpu's.
I would be thankful if you take a look at my question at stack overflow.
The text was updated successfully, but these errors were encountered:
Hi, sorry for the late reply. Let me first read your question and the answers on SO. I guess you have a point here. I'll let you know and if the statement turns out to be wrong, we will fix it in the upcoming edition or Packt will publish it as part of an Errata on their website (hopefully). Many thanks for your attention.
hi there,
I have been reading the Extreme C book, following paragraph seems to be wrong or unclear(take look at this question ).
as I know all the operations in CPU are limited to arithmetic(plus or minus) or bit-wise kind of operation.
and all the copying operations are bitwise at least in new cpu's.
I would be thankful if you take a look at my question at stack overflow.
The text was updated successfully, but these errors were encountered: