Hello,
Read this:
About C++ and Delphi and FreePascal generic (template) style containers..
Generics.Collections of Delphi and FreePascal for generic (template)
style containers that you can download from here:
https://github.com/maciej-izak/generics.collections
TList of Generics.Collections of Delphi and FreePascal is implemented
the same as STL C++ Vectors: they are array-based. And since data
structureS are the same then also performance should be comparable.
So I've done a small test between Tlist of Generics.Collections of
Delphi and FreePascal and C++ vector, it's an addition of 3000000
records of 16 byte length, in one loop, here is the results:
Tlist time = 344ms
Vector time = 339ms
It seems they are the same, the test use only the function ( List.add ,
vector.push_back).
STL vectors with the at() and Delphi TList of Generics.Collections of
Delphi and FreePascal perform bounds checking.
Thank you,
Amine Moulay Ramdane.