In the software I’m currently programming I’m using the events subsystem a lot, and I’m subclassing from ActiveModel. Each model typically only triggers 2-3 types of events, so the action dictionary is very small. And I have another similar case with a small dictionary (also typically 2-3 entries, at most 5). Lookups and event triggering happen at about 300 Hz. I’m wondering, wouldn’t be more efficient to just use arrays and a linear lookup instead of dictionaries? Or, has anyone implemented dictionaries optimized for a small number of entries? Any advice?<div dir="auto"><br></div><div dir="auto">In general, I think we don’t have models that trigger many different types of events, so it seems this optimization could be used in ActionModel. But perhaps it hasnt been a priority to optimize this because we don’t usually fire events at high rates, I guess.</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Luciano</div>