Get the latest tech news

How much memory do you need in 2024 to run 1M concurrent tasks?


ll remember the memory consumption comparison between asynchronous programming across popular languages in 2023? Now at the end of 2024, I wonder how things changed in the span of one year, with the latest version of languages. Let's do the benchmark again and see the results! The program to benchmark is the same with the one in the last year: Let's launch N concurrent tasks, where each task waits for 10 seconds and then the program exists after all tasks finish.

Coroutines are well-suited for implementing familiar program components such as cooperative tasks, exceptions, event loops, iterators, infinite lists and pipes. All programs were launched using the release mode if available, and support for internationalization and globalization was disabled as we did't have libicu in our test environment. As we have observed, a high number of concurrent tasks can consume a significant amount of memory, even if they do not perform complex operations.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Memory

Memory

Photo of concurrent tasks

concurrent tasks

Related news:

News photo

Java 24 to Reduce Object Header Size and Save Memory

News photo

Google’s Gemini chatbot now has memory

News photo

Controlling the Speed of Light for In-Memory Computing