class

Crysda::StringPool

Inherits Reference / Object

=========================================================================== String Pool for String Interning (Dictionary Encoding) Reduces memory for categorical columns with repeated values

Constructors

new(initial_capacity : Int32 = 64)
Source

Instance methods

beneficial?(total_strings : Int32) : Bool

Check if interning would be beneficial (high repetition ratio)

Source
clear
Source
hit_ratio

Statistics

Source
intern(str : String) : String

Intern a string - returns the canonical instance

Source
intern(str : String | Nil) : String | Nil

Intern a nullable string

Source
size

Number of unique strings in pool

Source