Whenever you are looking for the "fastest" or "best" way to do something in very particular circumstances, the answer almost always will be: experiment, and find out.
While there are rules of thumb to follow, they will not conclusively give you the best answer for your particular system, architecture, compiler, etc.
You will notice there are a few different answers to your question already, using different techniques.
How will you know which is best?
Answer: Try them out. Profile them.
N.b.: I'm being a little facetious. I suspect what you really want to know is how to do this at all, and not how to do it fastest.