Re: Biggest Delphi bottleneck?



System.GetDynaMethod

Using virtual methods usually solves this one, unless you're using TComponent subclasses too much... and are stuck with VCL-declared dynamics.

Classes.TList.IndexOf

The speed of this one can be fairly easily tripled using a mere "rep scasd", this may be enough to not make it a bottleneck in many situations (and can be plugged right in).
Hashing/Sorting have more potential, but also represent an overhead risk for a general purpose class, might be better suited for specialized list classes.

Classes.TList.Get

This one can be sped up too.

There are several TList speedups that were investigated back in 2003 in the mini "FasterTList" experiment (Add, Put, Pack, Move, Exchange could be sped up significantly IIRC).

Though in practice, I'm not using TList in my code much (got a faster, more powerful replacement built from the ground up), so the TList optimizations weren't brought to a conclusive end.
TList internals aren't very well designed to begin with, they're more a bunch of mismatched list behaviors packed together, and so optimizing it "cleanly" isn't simple, while replacing it altogether in code is simpler and cleaner.

Eric
.