Writing arenas in Rust from scratch 0 ▲ Artem Golubin 119 days ago · Tech · hide · Fediverse post Custom memory allocations and arenas are notoriously hard to deal with in Rust due to the ownership model. In a lot of projects, they can significantly improve performance. For example, let's take databases. Sending a query to a database produces a lot of temporary objects, and if the default allocator is used, you will need to allocate and deallocate thousands of small objects for each query, which is wasteful. Almost every database engine uses custom memory pools to improve performance. Some go so far as to statically allocate all the memory before the program starts. Another good example is scripting languages. I have an article on how Python uses arenas to reduce the number of allocations for Python types. A simple web app in Python can allocate more than a million of objects after 100 HTTP requests.[......] Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town