Building a string from small components (with varying size) in an efficient way requires using a specific datatype (like Buffer
) directly. In other words, as soon as one move beyond printing a single Uchar.t
value, the buffer path is nearly necessary. For me, this is a sign that an Uchar.to_string
function is more an efficiency trap for unsuspecting beginners than a really useful addition to the standard library.
1 Like