[Patch] Christmas gift by FreeSparta : Generics.Collections
Original Reporter info from Mantis: hnb
-
Reporter name: Maciej Izak
Original Reporter info from Mantis: hnb
- Reporter name: Maciej Izak
Description:
Ho ho ho, Merry Christmas :)
I've decided to close the "FreeSparta" project and I decided to give Generics.Collections library as an open source project.
Best regards,
Maciej Izak
Important:
TFastHashMap from Generics.Collections is faster than any other generic container for fpc :) (is based on "De-amortized Cuckoo Hashing" http://arxiv.org/abs/0903.0391). For big data count is even faster than TFPStringHashTable.
Suggestion:
- someone can extend generics.memoryexpanders for TCustomList/TList (for control memory growth by constraints)
- nice to have for dictionary hashing: http://blog.synopse.info/post/2014/05/25/New-crc32c%28%29-function-using-optimized-asm-and-SSE-4.2-instruction
Library (with RTL patch) is compatible with Rev 27327. To run this library in new version of compiler we need to fix:
REGRESSION: 26483 and 26481
and will be nice to fix
CRITICAL: 24848(!!!), 24872(!), 25607(!), 26030, 25917, 25918, 25620, 24283, 24254, 24287 (Related to? 24872)
IMPORTANT: 23862(!), 24097, 24285, 24286 (Similar to? 24285), 24098, 24609 (RTL inconsistency), 24534, 25606, 25614, 26177, 26195
OTHER: 26484, 24073, 24463, 25593, 25596, 25597, 25602, 26181 (or MYBAD?)
CLOSED BUT IMO STILL TO FIX: 25601(!), 25594
Additionaly attached patch implements important low level Delphi functions (useful for, Generics, RTTI and any scripting engine):
http://docwiki.embarcadero.com/Libraries/XE2/en/System.InitializeArray
procedure InitializeArray(p: Pointer; typeInfo: Pointer; elemCount: NativeUInt);
http://docwiki.embarcadero.com/Libraries/XE2/en/System.CopyArray
procedure CopyArray(Dest, Source, TypeInfo: Pointer; Count: NativeInt);
http://docwiki.embarcadero.com/Libraries/XE2/en/System.FinalizeArray
procedure FinalizeArray(P: Pointer; TypeInfo: Pointer; Count: NativeUInt);
http://docwiki.embarcadero.com/Libraries/XE2/en/System.DynArrayClear
procedure DynArrayClear(var A: Pointer; TypeInfo: Pointer);
http://docwiki.embarcadero.com/Libraries/XE2/en/System.DynArraySetLength
procedure DynArraySetLength(var a: Pointer; typeInfo: Pointer; dimCnt: NativeInt; lengthVec: PNativeInt);
http://docwiki.embarcadero.com/Libraries/XE2/en/System.DynArrayIndex
function DynArrayIndex(P: Pointer; const Indices: array of NativeInt; TypInfo: Pointer): Pointer; overload;
function DynArrayIndex(P: Pointer; const Indices: array of Integer; TypInfo: Pointer): Pointer; overload;
http://docwiki.embarcadero.com/Libraries/XE2/en/System.DynArrayDim
function DynArrayDim(typeInfo: Pointer): Integer;
http://docwiki.embarcadero.com/Libraries/XE2/en/System.DynArraySize
function DynArraySize(A: Pointer): NativeInt;
http://docwiki.embarcadero.com/Libraries/XE2/en/System.IsDynArrayRectangular
function IsDynArrayRectangular(const DynArray: Pointer; typeInfo: Pointer): Boolean;
http://docwiki.embarcadero.com/Libraries/XE2/en/System.DynArrayBounds
function DynArrayBounds(const DynArray: Pointer; typeInfo: Pointer): TBoundArray;