Re: [fpc-pascal] How to inline CompareFunc to Sort method in generic abstract class

2022-11-21 Thread Flávio Etrusco via fpc-pascal
Em sáb., 19 de nov. de 2022 18:27, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> escreveu: > (...) > >// this kind of constraint that uses T does not work yet >generic TList> = class > procedure Sort; >end; > > (...) > No? Sad, I use this all the time in Java. Be

Re: [fpc-pascal] How to inline CompareFunc to Sort method in generic abstract class

2022-11-21 Thread Flávio Etrusco via fpc-pascal
Hi, Thanks for the clarifications (although in some aspects I'm more confused now LOL). If you really want the performance gains (and if you're convinced of these gains, of course) maybe you could implement inlined functions for each key native datatype taking an offset for the field. And if you