Skip to content

memory footprint of concurrent tasks in different language runtimes

Notifications You must be signed in to change notification settings

spurreiter/async-runtimes-benchmarks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async-runtimes-benchmarks

Contains (rust) code from https://github.com/hez2010/async-runtimes-benchmarks-2024 👏

This repository contains a few programs written in various programming languages. Each program spawns N concurrent tasks. The number of tasks is controlled by the command line argument. Each tasks waits 10 seconds and finishes. The programs finish when all tasks exit.

The purpose of those programs is to measure the memory footprint of concurrent tasks in different language runtimes.

results

Hardware Apple M3

  • macOS 15, Apple M3

Versions

  • dotnet: 9.0.100
  • elixir: 1.17.3
  • go: 1.23.3
  • java: 23.0.1
  • nodejs: 22.11.0
  • bun: 1.1.38
  • deno: 2.1.2
  • python: 3.13.0
  • rust: 1.83.0

Results

Lower values are better.

Implementation 10k 100k 1M
dotnet 22M 38M 190M
elixir 88M 343M 3080M
go 29M 261M 2571M
java 93M 170M 1001M
nodejs 24M 93M 568M
bun 22M 69M 541M
deno 35M 132M 891M
python 27M 139M 1258M
rust_async_std 8M 53M 501M
rust_futures 4M 20M 190M
rust_tokio 5M 31M 328M

running...

prerequisites

macos

brew install node deno rust go dotnet elixir 
# for bun
curl -fsSL https://bun.sh/install | bash

linux

# TODO

run.sh

run measurement with run.sh bash script.

# e.g. go
./run.sh go 1000000
# run all implementations
./run.sh all 1000000

About

memory footprint of concurrent tasks in different language runtimes

Resources

Stars

Watchers

Forks

Languages

  • Shell 25.5%
  • Java 22.6%
  • Rust 14.4%
  • Elixir 13.0%
  • JavaScript 11.5%
  • Go 5.1%
  • Other 7.9%