View Single Post
  #11   Spotlight this post!  
Unread 17-02-2013, 18:20
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: logic gates question

My testing showed that at least on Intel, the top one that used XOR was more efficient.

I rewrote the other to use a case statement instead of a select and it was then the fastest. Selects tend to execute both the true and false and then select the appropriate one whereas case statements will only execute one or the other.

But at this level for toggle on a button on a joystick, we are in the weeds. Write what is readable.

Greg McKaskle
Reply With Quote