MySQL 9.6.0
Source Code Documentation
mysql::sets::Has_fast_size Concept Reference

Determines if the given type has "fast" size computations. More...

#include <meta.h>

Concept definition

template<class Set_t>
Determines if the given type has "fast" size computations.
Definition: meta.h:61
Helper to implement Has_fast_size.
Definition: meta.h:41

Detailed Description

Determines if the given type has "fast" size computations.

Set types can declare themselves as having "slow" size computations by defining a constexpr bool member variable named disable_fast_size and having the value true.

Typically, containers that store the size explicitly should not define disable_fast_size, whereas views over set operations, which may compute the size by iterating over the set, should define disable_fast_size.

For sets that have fast size operations, operations such as set equality can implement optimizations, by comparing the size first, and compare the full set element-by-element only for same-sized sets.