From 9795bd6e962a89c3361fb40cfb88034b2c04c533 Mon Sep 17 00:00:00 2001 From: Ein Anderssono Date: Thu, 23 Apr 2026 01:37:01 +0200 Subject: [PATCH] Update Mermaid charts with actual test data - Updated compiled languages chart with real performance data - Updated JIT-compiled languages chart with actual measurements - Updated interpreted languages chart with test results - Updated slowest languages chart with real data - All charts now reflect actual benchmark results from 100 decimal tests --- README.md | 34 +++++++++++++++++----------------- extract_chart_data.py | 24 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 17 deletions(-) create mode 100644 extract_chart_data.py diff --git a/README.md b/README.md index 90ba043..126d289 100644 --- a/README.md +++ b/README.md @@ -51,17 +51,17 @@ The following Mermaid charts show performance for each language with actual test ```mermaid xychart-beta title "Compiled Languages - Time (ms) at 100 decimals" - x-axis ["Assembly", "Go", "Nim", "Odin", "Rust", "C", "C++", "Fortran", "Obj-C", "Swift"] - y-axis "Time (ms)" 0 --> 40 - bar [30, 30, 30, 30, 30, 31, 34, 34, 35, 36] + x-axis ["Assembly", "C", "C++", "Rust", "Go", "Nim", "Odin", "Fortran", "Swift", "Crystal"] + y-axis "Time (ms)" 0 --> 35 + bar [9, 9, 9, 9, 9, 9, 9, 27, 29, 28] ``` ```mermaid xychart-beta title "Compiled Languages - Memory Usage (MB) at 100 decimals" - x-axis ["Assembly", "Go", "Nim", "Odin", "Rust", "C", "C++", "Fortran", "Obj-C", "Swift"] - y-axis "Memory (MB)" 0 --> 6 - bar [0, 0, 0, 0, 0, 0, 0, 1, 5, 4] + x-axis ["Assembly", "C", "C++", "Rust", "Go", "Nim", "Odin", "Fortran", "Swift", "Crystal"] + y-axis "Memory (MB)" 0 --> 1 + bar [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ``` #### JIT-Compiled Languages @@ -69,17 +69,17 @@ xychart-beta ```mermaid xychart-beta title "JIT-Compiled Languages - Time (ms) at 100 decimals" - x-axis ["Java", "CSharp", "Kotlin", "Julia"] - y-axis "Time (ms)" 0 --> 120 - bar [89, 94, 101, 299] + x-axis ["Java", "C#", "Kotlin", "Julia"] + y-axis "Time (ms)" 0 --> 300 + bar [57, 57, 83, 290] ``` ```mermaid xychart-beta title "JIT-Compiled Languages - Memory Usage (MB) at 100 decimals" - x-axis ["Java", "CSharp", "Kotlin", "Julia"] - y-axis "Memory (MB)" 0 --> 2 - bar [1, 1, 1, 1] + x-axis ["Java", "C#", "Kotlin", "Julia"] + y-axis "Memory (MB)" 0 --> 3 + bar [2, 2, 2, 2] ``` #### Interpreted Languages @@ -88,8 +88,8 @@ xychart-beta xychart-beta title "Interpreted Languages - Time (ms) at 100 decimals" x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"] - y-axis "Time (ms)" 0 --> 180 - bar [88, 115, 127, 134, 169] + y-axis "Time (ms)" 0 --> 90 + bar [57, 55, 77, 79, 84] ``` ```mermaid @@ -97,7 +97,7 @@ xychart-beta title "Interpreted Languages - Memory Usage (MB) at 100 decimals" x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"] y-axis "Memory (MB)" 0 --> 3 - bar [1, 1, 2, 1, 1] + bar [2, 2, 2, 2, 2] ``` #### Slowest Languages @@ -106,8 +106,8 @@ xychart-beta xychart-beta title "Slowest Languages - Time (ms) at 100 decimals" x-axis ["Erlang", "R", "Elixir", "Scala", "TypeScript"] - y-axis "Time (ms)" 0 --> 1800 - bar [311, 351, 606, 737, 1780] + y-axis "Time (ms)" 0 --> 900 + bar [130, 349, 898, 58, 154] ``` ### Resource Usage Over Time diff --git a/extract_chart_data.py b/extract_chart_data.py new file mode 100644 index 0000000..5a598f5 --- /dev/null +++ b/extract_chart_data.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +import csv + +# Read performance data and create summary +data = {} +with open('performance_data.csv', 'r') as f: + reader = csv.reader(f) + next(reader) # Skip header + for row in reader: + if len(row) >= 5 and row[1] and row[1] not in ['SUCCESS', 'Brainfuck', 'Ruby'] and not row[1].startswith('3.'): + decimals = row[0] + language = row[1] + time = row[2] + memory = row[3] + + if decimals not in data: + data[decimals] = [] + data[decimals].append({'lang': language, 'time': time, 'mem': memory}) + +# Print summary for 100 decimals +if '100' in data: + print("=== 100 decimals ===") + for entry in data['100'][:15]: + print(f"{entry['lang']}: {entry['time']}ms, {entry['mem']}") \ No newline at end of file