On Sat, Feb 16, 2019 at 5:44 PM Benito van der Zander <ben...@benibela.de>
wrote

> it can turn out the enumerators are slower than an old school loop
>

The trick with enumerators is to never make them classes, and use advanced
records instead, I've found. This way you avoid the heap allocation and the
implicit try/finally. Also make sure you inline the MoveNext and
GetCurrent!
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to