Boost logo

Boost :

From: Benedict Bede McNamara (benedict_at_[hidden])
Date: 2022-08-02 22:30:39


It appears that the main fact determining collection build speed is the heap you use. I++ now uses its own binary heap to perform allocations for the collection forward_list (which is what oarchive uses). So binary serialization goes even faster now. Here are some figures for collections with a million elements:

stl list build time is: 0:0:0:0:27
stl list sort time is: 0:0:0:0:21
stl forward_list build time is: 0:0:0:0:20
stl forward_list sort time is: 0:0:0:0:20
stl set build time is: 0:0:0:0:111
I++ set build time is: 0:0:0:0:61
stl unordered_set build time is: 0:0:0:0:149
stl map build time is: 0:0:0:0:118
I++ dictionary build time is: 0:0:0:0:60
Linked list build time is: 0:0:0:0:23
Linked list sort time is: 0:0:0:0:23
Forward list build time is: 0:0:0:0:16
Forward list sort time is: 0:0:0:0:17
I++ serialization/deserialization time is: 0:0:0:0:150
list build time is: 0:0:0:0:74
stl vector build time is: 0:0:0:0:5
Vector sort time is: 0:0:0:0:12
Quick Sort time is: 0:0:0:0:10
heap allocations: 12000007
heap allocations: 0

>From this we see that in general binary serialization/deserialization takes a bit longer than collection allocation. For example the serialization/deserialization time is 150 milliseconds for a million elements whereas forward_list only takes 16 milliseconds to build. I would be interested to see what the equivalent figures are for Boosts text based serialization.

Yours Sincerely,
Benedict Bede McNamara

P.S. The program that produced these figures is attached.

Sent from Mail for Windows




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk