1

I'm developing a game in C#/Unity and I'm wondering if there's a performance boost of using a delegate event instead of iterating over a list of objects and calling on functions.

// Which one is more performant?
foreach (Foo foo in someListOfFoo)
{
    foo.Update();
}

// Or...
updateFoos(); // updateFoos is an event
Shon Verch
  • 141
  • 1
  • 8

0 Answers0