which function is more performant .IsChildOf, Implements Interface, .HashTag?

Hey. I am calling MultiLineTrace which returns many objects. I want to keep references in an array of references of only certain objects.

And this is how I can:

  • Check .HasTag ()
  • Check parent class .IsChildOf ()
  • Check interface .ImplementsInterface ()

But which function is the fastest?

They’re all roughly the same. Pretty much all boil down to a for loop with an integer compare. I feel like this is one of those “don’t try to optimize too soon” cases, just go with what works for now.