Skip to content

Commit

Permalink
LTO
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeladler committed Dec 5, 2023
1 parent 1b732c7 commit b9ded88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ Tests using the actual `input.txt` have to be enabled at compile time with the `
### Release Build

```bash
meson setup build --buildtype release -Dhave-inputs=true
meson setup --buildtype=release -Db_lto=true -Dhave-inputs=true build
ninja -C build
```

### Debug Build

For a debug-optimized build with address sanitization:

```bash
meson setup build_debug --buildtype debugoptimized -Db_sanitize=address -Db_lundef=false -Dhave-inputs=true
meson setup --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dhave-inputs=true build_debug
ninja -C build_debug
```

## Performance Benchmarks
Expand All @@ -38,10 +40,10 @@ I've benchmarked the solutions on different processors to give you an idea of th

| Day | Intel i7-11850H | AMD Ryzen 5 PRO 4650U |
| --- | --------------- | --------------------- |
| 1 | 351 µs | 520 µs |
| 2 | 282 µs | 209 µs |
| 3 | 348 µs | 678 µs |
| 4 | 447 µs | 1 ms |
| 1 | 370 µs | 520 µs |
| 2 | 185 µs | 209 µs |
| 3 | 259 µs | 678 µs |
| 4 | 368 µs | 1 ms |

## Acknowledgments and Resources

Expand Down
1 change: 0 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ _default:
just --list

watch:
#!/usr/bin/env bash
fd ".*c$" -t f | entr ninja -C build_debug test

generate DAY:
Expand Down

0 comments on commit b9ded88

Please sign in to comment.