# How many strings can you create per second?

DevFeed: [How many strings can you create per second?](<https://devfeed.tech/articles/how-many-strings-can-you-create-per-second-59788.md>)

Original publisher: [Read original article](<https://lemire.me/blog/2026/09/25/how-many-strings-can-you-create-per-second/>)

Author: Daniel Lemire

Published: 2026-09-25T01:30:49Z

Content type: article

Language: en

Sources: [Daniel Lemire](<https://devfeed.tech/sources/daniel-lemire.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Rust](<https://devfeed.tech/topics/rust.md>), [Bun](<https://devfeed.tech/topics/bun.md>), [Nim](<https://devfeed.tech/topics/nim.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>)

Tags: [bun](<https://devfeed.tech/tags/bun.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [go](<https://devfeed.tech/tags/go.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [macos](<https://devfeed.tech/tags/macos.md>), [nim](<https://devfeed.tech/tags/nim.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rust](<https://devfeed.tech/tags/rust.md>)

## AI overview

A benchmark compares how quickly Python, JavaScript runtimes, C++, Rust, Go, and Nim can create short strings from integers. C++ is fastest in the reported Apple M4 Max tests, while Python is slowest; the article attributes C++'s result to small string optimization and notes that garbage-collected runtimes handle many short-lived objects efficiently.

## Source excerpt

We create new strings all the time. How quickly can you produce short strings in your programming languge? To create a meaningful string, we convert an integer to a string. In Python, that is str(i). The loop stores each new string in a small ring buffer of 1024 slots, so that the engine cannot simply ... Continue reading How many strings can you create per second?