Rico Mariani
Mar 25, 2024

--

I can only assume that you benchmarked two different ways to copy a string or else the strings were too small or something.

std::string assignment is not cheap.

The normal thing you do in rust is pass around and copy string slices. Super cheap.

--

--

Rico Mariani
Rico Mariani

Written by Rico Mariani

I’m an Architect at Microsoft; I specialize in software performance engineering and programming tools.

Responses (2)