Thread: unions in C
View Single Post
  #2   Spotlight this post!  
Unread 07-11-2003, 11:44
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
Unions should be handled entirely by the compiler so there really shouldn't be too large of a performance hit. However, I'd recommend using macro's to manipulate bits using binary math (and, or, xor, not, etc.). After all, that's all the compiler is doing and you may be able to optomize it better than the compiler does.

Matt