I am using AVR controller atmega328.
I need to check the status of two bits. I have two approaches, but not sure which one is most efficient. In first case in the code below, I am reading the port using PIND command twice (Two times PIND access is made). So is this an issue or I have to go with second if statement? 

```
#define SW1 2
#define SW2 5
//check if both are high
if((PIND&(1<<SW1))&&(PIND&(1<<SW2))) 
//Or
if((PIND&((1<<SW1)|(1<<SW2)))==((1<<SW1)|(1<<SW2))) 

```