Fastest way to select between different functionalities?

I’m making a game where a lot of data has to process on the cpu side every frame, so I need to find the most efficient method. There are, let’s say, a fairly large number of possible chunks of code which need to be selected inside a loop based on certain data. Due to the extremely high number of iterations I need this to have the least overhead possible in selecting the code. The three options I see are:

  1. A large if/elseif statement with a chunk of code in each part
  2. A switch/case statement with a chunk of code in each part
  3. Using delegates where each chunk of code is inside a function call

Which do you think would be the fastest?

To answer directly, the “if” with no function call will, technically, be fastest if there are few options. If there are many options, then a switch will, most likely, make the selection faster. A function call is always an indirection with parameter passing overheads.

However, in truth, these time savings will be incredibly minimal. Far better will be to organise your code in an easy to maintain fashion and then profile the results to find the true bottlenecks and optimise those.