Nature Language Benchmark

January 12, 2026 · View on GitHub

This repository contains performance benchmarks comparing the Nature programming language with other mainstream languages.

Test Environment

ItemConfiguration
DeviceMac mini M4 (VM)
CPUApple M4, 10 cores
Memory7.80 GB
SystemLinux ubuntu 6.17.8-orbstack (aarch64)

Benchmark Results

1. HTTP Server

HTTP server performance using ApacheBench (ab -n 100000 -c 1000).

LanguageVersionQPS (req/sec)Mean Response Time
Naturev0.7.2~104,0009.60 ms
Go1.25.5~90,00011.02 ms
Node.jsv25.2.0~66,00014.99 ms

2. Fibonacci Recursion

Calculate fib(45), testing recursion performance and function call overhead.

LanguageVersionMean Time
Rust1.92.0~1.758 s
Naturev0.7.2~2.453 s
Go1.25.5~2.421 s
Node.jsv25.2.0~6.198 s

3. Pi Calculation

Calculate π using Leibniz series, testing floating-point arithmetic performance.

LanguageVersionMean Time
Naturev0.7.2~512.9 ms
Go1.25.5~512.3 ms
Rust1.92.0~552.6 ms
Node.jsv25.2.0~850.8 ms

4. FFI Calls

Call C library function sqrt() 100 million times, testing FFI call overhead.

LanguageVersionMean Time
Naturev0.7.2~73.9 ms
Go1.25.5~2178 ms

5. Coroutine

Create 1 million coroutines for concurrent execution, testing coroutine creation efficiency and memory usage.

LanguageVersionCreation TimeCompletion TimePeak Memory
Naturev0.7.2~559 ms~589 ms~969 MB
Go1.25.5~1035 ms~1047 ms~2580 MB

Test Directories

Each test directory contains source code for each language and detailed test results: