i was reading an implementation of a basic ECS in C# and their way of getting components on entities was to take the component type in as a generic, then compare against every component in the entity in a loop with gettype().equals(typeof(T)), resulting in a worst-case scenario O(n) lookup time.