Add resource usage timeline diagrams to README

- Added Mermaid XY charts showing memory usage over time
- Individual charts for Elixir, TypeScript, Dart, Haskell, C
- Comparison chart for fast languages
- Shows how memory usage varies during program execution
- Based on actual timeline data from benchmark runs
This commit is contained in:
Ein Anderssono
2026-04-23 01:03:40 +02:00
parent 8723db1033
commit cbc9eef036
130 changed files with 1339 additions and 110 deletions
+352
View File
@@ -0,0 +1,352 @@
# Resursanvändning över tid
Följande diagram visar minnesanvändning över tid för varje språk.
## Bash
```mermaid
xychart-beta
title "Bash - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 77
y-axis "Minne (MB)" 0 --> 2.96875
line [2.0, 2.0, 2.0, 2.0]
```
## Brainfuck
```mermaid
xychart-beta
title "Brainfuck - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 32
y-axis "Minne (MB)" 0 --> 2.96875
line [2.0, 2.0]
```
## C
```mermaid
xychart-beta
title "C - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 5
y-axis "Minne (MB)" 0 --> 1.0
line [0.0]
```
## C++
```mermaid
xychart-beta
title "C++ - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 8
y-axis "Minne (MB)" 0 --> 2.4375
line [1.4]
```
## CSharp
```mermaid
xychart-beta
title "CSharp - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 35
y-axis "Minne (MB)" 0 --> 2.984375
line [2.0, 2.0]
```
## D
```mermaid
xychart-beta
title "D - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 8
y-axis "Minne (MB)" 0 --> 1.484375
line [0.5]
```
## Dart
```mermaid
xychart-beta
title "Dart - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 11
y-axis "Minne (MB)" 0 --> 10.09375
line [9.1]
```
## Elixir
```mermaid
xychart-beta
title "Elixir - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 294
y-axis "Minne (MB)" 0 --> 3.0
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
```
## Erlang
```mermaid
xychart-beta
title "Erlang - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 101
y-axis "Minne (MB)" 0 --> 3.015625
line [2.0, 2.0, 2.0, 2.0, 2.0]
```
## Fortran
```mermaid
xychart-beta
title "Fortran - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 32
y-axis "Minne (MB)" 0 --> 2.75
line [1.8, 1.8]
```
## Go
```mermaid
xychart-beta
title "Go - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 6
y-axis "Minne (MB)" 0 --> 1.0
line [0.0]
```
## Haskell
```mermaid
xychart-beta
title "Haskell - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 7
y-axis "Minne (MB)" 0 --> 11.546875
line [10.5]
```
## Java
```mermaid
xychart-beta
title "Java - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 30
y-axis "Minne (MB)" 0 --> 2.984375
line [2.0, 2.0]
```
## JavaScript
```mermaid
xychart-beta
title "JavaScript - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 494
y-axis "Minne (MB)" 0 --> 3.0
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 0.0]
```
## Julia
```mermaid
xychart-beta
title "Julia - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 135
y-axis "Minne (MB)" 0 --> 3.0
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
```
## Kotlin
```mermaid
xychart-beta
title "Kotlin - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 34
y-axis "Minne (MB)" 0 --> 2.96875
line [2.0, 2.0]
```
## Lua
```mermaid
xychart-beta
title "Lua - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 57
y-axis "Minne (MB)" 0 --> 3.0
line [2.0, 2.0, 2.0]
```
## Nim
```mermaid
xychart-beta
title "Nim - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 8
y-axis "Minne (MB)" 0 --> 3.328125
line [2.3]
```
## Objective-C
```mermaid
xychart-beta
title "Objective-C - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 5
y-axis "Minne (MB)" 0 --> 1.0
line [0.0]
```
## Odin
```mermaid
xychart-beta
title "Odin - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 8
y-axis "Minne (MB)" 0 --> 5.0
line [4.0]
```
## PHP
```mermaid
xychart-beta
title "PHP - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 32
y-axis "Minne (MB)" 0 --> 2.984375
line [2.0, 2.0]
```
## Perl
```mermaid
xychart-beta
title "Perl - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 30
y-axis "Minne (MB)" 0 --> 2.953125
line [2.0, 2.0]
```
## Python
```mermaid
xychart-beta
title "Python - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 9
y-axis "Minne (MB)" 0 --> 2.953125
line [2.0]
```
## R
```mermaid
xychart-beta
title "R - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 151
y-axis "Minne (MB)" 0 --> 2.984375
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
```
## Ruby
```mermaid
xychart-beta
title "Ruby - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 53
y-axis "Minne (MB)" 0 --> 2.953125
line [2.0, 2.0, 2.0]
```
## Scala
```mermaid
xychart-beta
title "Scala - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 351
y-axis "Minne (MB)" 0 --> 3.0
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
```
## Swift
```mermaid
xychart-beta
title "Swift - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 7
y-axis "Minne (MB)" 0 --> 1.0
line [0.0]
```
## TypeScript
```mermaid
xychart-beta
title "TypeScript - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 1419
y-axis "Minne (MB)" 0 --> 3.015625
line [1.9, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
```
## Zig
```mermaid
xychart-beta
title "Zig - Resursanvändning över tid"
x-axis "Tid (ms)" 0 --> 8
y-axis "Minne (MB)" 0 --> 3.65625
line [2.7]
```
# Jämförelser
## Snabba språk (< 50ms)
```mermaid
xychart-beta
title "Snabba språk - Minnesanvändning"
x-axis "Tid (ms)" 0 --> 35
y-axis "Minne (MB)" 0 --> 11.546875
line [2.0, 2.0]
line [0.0]
line [1.4]
line [2.0, 2.0]
line [0.5]
line [9.1]
line [1.8, 1.8]
line [0.0]
line [10.5]
line [2.0, 2.0]
line [2.0, 2.0]
line [2.3]
line [0.0]
line [4.0]
line [2.0, 2.0]
line [2.0, 2.0]
line [2.0]
line [0.0]
line [2.7]
```
## Medelsnabba språk (50-200ms)
```mermaid
xychart-beta
title "Medelsnabba språk - Minnesanvändning"
x-axis "Tid (ms)" 0 --> 151
y-axis "Minne (MB)" 0 --> 3.015625
line [2.0, 2.0, 2.0, 2.0]
line [2.0, 2.0, 2.0, 2.0, 2.0]
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
line [2.0, 2.0, 2.0]
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
line [2.0, 2.0, 2.0]
```
## Långsamma språk (200ms+)
```mermaid
xychart-beta
title "Långsamma språk - Minnesanvändning"
x-axis "Tid (ms)" 0 --> 1443
y-axis "Minne (MB)" 0 --> 3.015625
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 0.0]
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
line [1.9, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
```