I am putting together a project which will have some options selected by dip switch settings. I have enough pins to dedicate a pin to each dip switch.
My question: is it better to scan the dip switches at startup and then store those values in a variable or is it OK to look at the pins that the dip switches are connected to every time I want to check the option? Is it slower to read the PIN state as opposed to reading the variable?

Thanks

Chris