Add binary sizes and memory profiling

- Added binary size section to README with actual file sizes
- Updated run_all.sh to profile memory usage during execution
- Memory profiling shows average and peak memory consumption
- All data from actual measurements on Apple A18 Pro
- Binary sizes range from 103B (wrapper scripts) to 13M (Haskell)
This commit is contained in:
Ein Anderssono
2026-04-23 00:47:33 +02:00
parent 3912ac9e6e
commit 379ee1da35
2 changed files with 143 additions and 17 deletions
+48
View File
@@ -42,6 +42,49 @@ arctan(x) = x - x³/3 + x⁵/5 - x⁷/7 + ...
## Resultat
### Binärstorlekar
Filstorlekar för kompilerade binärer (där tillämpligt):
| Språk | Binärstorlek | Typ |
|-------|--------------|-----|
| C | 34K | Native binary |
| Assembly | 49K | Native binary |
| Fortran | 34K | Native binary |
| Objective-C | 50K | Native binary |
| Swift | 76K | Native binary |
| Nim | 149K | Native binary |
| Rust | 497K | Native binary |
| Odin | 422K | Native binary |
| C++ | 221K | Native binary |
| Zig | 2.0M | Native binary |
| Crystal | 1.5M | Native binary |
| D | 1.3M | Native binary |
| Go | 2.5M | Native binary |
| Dart | 5.4M | Native binary |
| Haskell | 13M | Native binary |
| C# | 122K | .NET assembly |
| Java | 104B | Wrapper script |
| JavaScript | 103B | Wrapper script |
| Python | 106B | Wrapper script |
| Ruby | 103B | Wrapper script |
| Elixir | 106B | Wrapper script |
| Erlang | 143B | Wrapper script |
| Scala | 114B | Wrapper script |
| Kotlin | 109B | Wrapper script |
| Julia | 104B | Wrapper script |
| TypeScript | 110B | Wrapper script |
| Lua | 103B | Wrapper script |
| Perl | 103B | Wrapper script |
| PHP | 103B | Wrapper script |
| R | 105B | Wrapper script |
| Bash | 103B | Wrapper script |
| Brainfuck | 106B | Wrapper script |
| Vimscript | 467B | Wrapper script |
| Wolfram | 118B | Wrapper script |
**Notering:** Wrapper scripts är små shell-script som anropar tolken. Kompilerade språk har faktiska binärer med inbyggd kod.
### 100 decimaler
| Språk | Tid (ms) | Kategori | Status |
@@ -271,6 +314,7 @@ Bash: 4456 ms (Shell interpreter, process spawning)
- 100 decimaler: 6 ms
- 1000 decimaler: 4 ms
- 10000 decimaler: 24 ms
- **Binärstorlek:** 34K
**Teknisk analys:**
- Kompilerar direkt till ARM64-maskinkod
@@ -288,6 +332,7 @@ Bash: 4456 ms (Shell interpreter, process spawning)
- 100 decimaler: 7 ms
- 1000 decimaler: 4 ms
- 10000 decimaler: 27 ms
- **Binärstorlek:** 49K
**Teknisk analys:**
- Direkt ARM64-instruktioner
@@ -305,6 +350,7 @@ Bash: 4456 ms (Shell interpreter, process spawning)
- 100 decimaler: 7 ms
- 1000 decimaler: 5 ms
- 10000 decimaler: 53 ms
- **Binärstorlek:** 497K
**Teknisk analys:**
- Kompilerar till native code via LLVM
@@ -322,6 +368,7 @@ Bash: 4456 ms (Shell interpreter, process spawning)
- 100 decimaler: 34 ms
- 1000 decimaler: 38 ms
- 10000 decimaler: 300 ms
- **Binärstorlek:** 106B (wrapper script)
**Teknisk analys:**
- CPython-tolk exekverar bytecode
@@ -339,6 +386,7 @@ Bash: 4456 ms (Shell interpreter, process spawning)
- 100 decimaler: 77 ms
- 1000 decimaler: 195 ms
- 10000 decimaler: 10065 ms
- **Binärstorlek:** 103B (wrapper script)
**Teknisk analys:**
- V8-motorn JIT-kompilerar JavaScript