Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions cs/Systems Language Performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tags:
- comparison
type: comparison
status: complete
created: 2025-12-04
created: "2025-12-04"
---

# Systems Language Performance
Expand Down Expand Up @@ -53,6 +53,7 @@ Source → Compiler → Machine Code → CPU
```

**Characteristics:**

- No hidden costs
- Predictable memory layout
- Direct syscalls possible
Expand All @@ -71,6 +72,7 @@ Source → Compiler → Machine Code → CPU
```

**Characteristics:**

- Zero-cost abstractions (templates, RAII, constexpr)
- Costs when using: virtual, RTTI, exceptions
- More optimization opportunities than C
Expand All @@ -89,6 +91,7 @@ Source → Compiler → LLVM IR → Machine Code → CPU
```

**Characteristics:**

- Same performance ceiling as C/C++
- Safety checks at compile time, not runtime
- Predictable: no hidden allocations
Expand All @@ -111,6 +114,7 @@ Source → Compiler → Machine Code → CPU
```

**Characteristics:**

- GC pauses (sub-millisecond, but present)
- Goroutine overhead (~2KB initial stack)
- Escape analysis reduces allocations
Expand All @@ -133,6 +137,7 @@ Source → Compiler → .wasm → Runtime → (JIT/AOT) → CPU
```

**Characteristics:**

- ~0.8-1.0x native speed (JIT/AOT)
- Mandatory bounds checking
- No direct syscalls (WASI abstraction)
Expand Down Expand Up @@ -201,7 +206,7 @@ Go:
| Go | ~1.2MB | ~1.8MB | Runtime + GC |
| WASM | ~10KB | ~50KB | + runtime memory |

*Static linking increases binary size but reduces dependencies*
_Static linking increases binary size but reduces dependencies_

---

Expand All @@ -217,7 +222,7 @@ Raw number crunching, SIMD-friendly.
| Image processing | 1.0x | 1.0x | 1.0x | 1.2-1.5x | 1.0-1.3x |
| Crypto | 1.0x | 1.0x | 1.0x | 1.1-1.3x | 1.0-1.2x |

*SIMD support: C/C++/Rust (intrinsics), Go (limited), WASM (SIMD proposal)*
_SIMD support: C/C++/Rust (intrinsics), Go (limited), WASM (SIMD proposal)_

### Memory-Bound

Expand All @@ -229,7 +234,7 @@ Cache efficiency, allocation patterns.
| Pointer chasing | 1.0x | 1.0x | 1.0x | 1.0x |
| Many small allocations | 1.0x | 1.0-1.2x | 1.0-1.1x | 1.5-3.0x |

*Go's GC adds overhead for allocation-heavy workloads*
_Go's GC adds overhead for allocation-heavy workloads_

### I/O-Bound

Expand All @@ -242,7 +247,7 @@ Syscalls, async, concurrency.
| Network (async) | Complex | Complex | 1.0x (tokio) | 1.0x (goroutines) |
| 10K connections | Hard | Hard | Easy | Easy |

*Go and Rust async excel at concurrent I/O*
_Go and Rust async excel at concurrent I/O_

---

Expand Down
2 changes: 1 addition & 1 deletion cs/Testing Strategies.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags:
- quality
type: reference
status: complete
created: 2025-12-04
created: "2025-12-04"
---

# Testing Strategies
Expand Down
3 changes: 2 additions & 1 deletion cs/WebAssembly.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tags:
- portable
type: reference
status: complete
created: 2025-12-04
created: "2025-12-04"
---

# WebAssembly
Expand Down Expand Up @@ -217,6 +217,7 @@ Stack evolution:
### Traps

Execution stops on:

- Out of bounds memory access
- Divide by zero
- Invalid indirect call
Expand Down
Loading