AVERAGE_STRING_LENGTH

Constant AVERAGE_STRING_LENGTH 

Source
const AVERAGE_STRING_LENGTH: usize = 16;
Expand description

A byte size value representing the number of bytes to allocate per string in GenericStringBuilder

To create a GenericStringBuilder using .with_capacity we are required to provide: \

  • item_capacity - the row count \
  • data_capacity - total string byte count \

We will use the AVERAGE_STRING_LENGTH * row_count for data_capacity. \

These capacities are preallocation hints used to improve performance, but consequences of passing a hint too large or too small should be negligible.