Original Post
🔒 Locked
i^=i
Advertisement
If you have a post Stone-Age compiler,
it will already optimize i=0 into i^=i;
Of course, on µPs with a zero register,
loading from that register is as fast,
and doesn''t hog the ALU.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
it will already optimize i=0 into i^=i;
Of course, on µPs with a zero register,
loading from that register is as fast,
and doesn''t hog the ALU.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement