You are not logged in.
Current capacity growing algorithm for String/Object arrays inside TRawUTF8List is
if result>=capacity then begin
inc(capacity,256+fCount shr 3);
My application widely use TRawUTF8List to store name-value pairs and minimum capacity of 256 is seams to be too large.
Both C++ vector and FPC TFPList use more flexible algorithms. I'm copy-paste FPC algorithm in #187 pull request and test it with my real use-case (/usr/bin/time myApp)
Current algo:
Maximum resident set size (kbytes): 278840
Minor (reclaiming a frame) page faults: 81035
FPC algo:
Maximum resident set size (kbytes): 274920
Minor (reclaiming a frame) page faults: 79774
Memory allocation is better with FPC algorithm.
Benchmark performance is also increased.
@ab if you don't mind please, merge in #187 pull request into master
Last edited by mpv (2019-04-13 12:14:10)
Offline
Offline