Skip to content

A comparison of traditional garbage collection vs. the approach of Rust.

Notifications You must be signed in to change notification settings

techatspree/GcRustVsJvm

Repository files navigation

What's this?

This code contains examples used in these blog articles:

Kotlin

The Kotlin example is built and run using Gradle.

./gradlew computeAverageIncome

Rust

You need at least the version 1.46.0 of rustc to build this example.

To build and run the Rust application you have to move to its project directory:

cd src/main/rust/compute_average_income

Running the slow development Rust version:

cargo run

Running the fast Rust version:

cargo run --release

Haskell

You need an installation of Stack.

To build and run the Haskell benchmark:

./gradlew computeAverageIncomeHaskell

Run all benchmarks

First you have to install everything needed for the individual benchmarks. Then you can start all at once:

./gradlew computeAverageIncome