You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/container.qbk
+73Lines changed: 73 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1314,6 +1314,79 @@ user can `#define BOOST_CONTAINER_MEMZEROED_POINTER_IS_NOT_ZERO` before includin
1314
1314
1315
1315
[endsect]
1316
1316
1317
+
[section:some_comparisons Boost container attributes and comparison with standard library implementations]
1318
+
1319
+
[section:sizeof `sizeof` comparison across major implementations]
1320
+
1321
+
These two tables compare `sizeof(container)` across major implementations and Boost.Container.
1322
+
1323
+
[table:sizeof_comparison sizeof comparison in 32/64 bit systems
1324
+
[[Container] [Boost.Container ] [libstdc++ (GCC)] [libc++ (Clang)] [Microsoft STL [footnote Uses heap-allocated sentinels for `list` and `[multi_]set/map`, resulting in a smaller `sizeof` but requiring allocation on construction.]]]
[[`string` [footnote Boost.Container has a SSO size option
1330
+
([classref boost::container::inline_chars inline_chars]) that changes the `sizeof`.
1331
+
The number shown is the `sizeof` for the default SSO size]]
1332
+
[12 / 24] [24 / 32] [12 / 24] [24 / 32] ]
1333
+
]
1334
+
1335
+
[endsect]
1336
+
1337
+
[section:string_sso String Small String Optimization (SSO) comparison across major implementation]
1338
+
1339
+
This tables shows the number of characters (excluding the null terminator) that can be hold inline across major implementations and Boost.Container.
1340
+
1341
+
[table:sso_capacity SSO capacity for string
1342
+
[[Mode] [Boost.Container [footnote Boost.Container has a SSO size selection (up to 127 characters) option called [classref boost::container::inline_chars inline_chars] ]]
`deque` implementations are based on a segmented array of blocks, and the block size is an important parameter that affects performance.
1353
+
This table shows the block size in bytes for `deque` implementations across major implementations and Boost.Container.
1354
+
1355
+
[table:block_sizes Deque Block Sizes
1356
+
[[Implementation] [Block Size in bytes] ]
1357
+
[[Boost.Container] [512 (32-bit) / 1024 (64-bit) [footnote Boost.Container has an option to select the [classref boost::container::block_size block_size] ] ] ]
1358
+
[[libstdc++ (GCC)] [512 ] ]
1359
+
[[libc++ (Clang)] [4096] ]
1360
+
[[Microsoft STL] [16] ]
1361
+
]
1362
+
1363
+
[endsect]
1364
+
1365
+
[section:boost_sizeof `sizeof` value of Boost.Container containers]
1366
+
1367
+
[table:sizeof_comparison `sizeof` comparison between Boost Containers (in bytes)
1368
+
1369
+
This table shows the `sizeof` value of Boost.Container containers in 32 and 64 bit systems. Note that these values can be changed by configuration options
1370
+
(like [classref boost::container::stored_size stored_size]) so they are shown here for the default configuration.
1371
+
1372
+
[[Container] [32-bit] [64-bit] ]
1373
+
[[`vector`] [12] [24] ]
1374
+
[[`deque`] [16] [32] ]
1375
+
[[`devector`] [16] [32] ]
1376
+
[[`segmented_vector`] [12] [24] ]
1377
+
[[`stable_vector`] [20] [40] ]
1378
+
[[`list`] [12] [24] ]
1379
+
[[`slist`] [8] [16] ]
1380
+
[[`map/set`] [16] [32] ]
1381
+
[[`flat_[multi_]map/set` [footnote `boost::containter::flat_xxx` containers are by default ordered `vector`s, but these containers can be configure to use another container as the underlying sequence ] ]
0 commit comments