docs(readme): pin benchmark table to v0.1.2
- commit
- abb6a3f2c7982e140d530fcccea5d99109805c0b
- author
- brice · · 2026-10-10 07:23 UTC
- parent
- 1e7884d
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +9 -9
M README.md +9 -9
| @@ -21,7 +21,7 @@ output.DP-1.scale = 1.5 | |||
| 21 | 21 | - **Safe for real configs**: atomic saves, symlinked dotfiles, editors that | |
| 22 | 22 | save by rename, missing directories, broken files that keep the last good | |
| 23 | 23 | config, and warnings that never print values (they may be secrets). | |
| 24 | - | - **Fast**: about 750 MB/s to parse, 2 allocations per reported change | |
| 24 | + | - **Fast**: about 1 GB/s to parse, 2 allocations per reported change | |
| 25 | 25 | (see [Performance](#performance)). | |
| 26 | 26 | ||
| 27 | 27 | ```sh | |
| @@ -110,23 +110,23 @@ skips saves that change no value. | |||
| 110 | 110 | ||
| 111 | 111 | ## Performance | |
| 112 | 112 | ||
| 113 | - | Measured at `v0.1.1` (`ebc8127`, 2026-10-10) with Go 1.27.1 on linux/amd64 | |
| 114 | - | with an AMD Ryzen 9 7900X3D. Values are medians of 6 runs. The input is a | |
| 113 | + | Measured at `v0.1.2` (`1e7884d`, 2026-10-10) with Go 1.27.1 on linux/amd64 | |
| 114 | + | with an AMD Ryzen 9 7900X3D. Values are medians of 10 runs. The input is a | |
| 115 | 115 | realistic ~2.9 KB config of 100 lines with comments, 60 binds and 8 outputs. | |
| 116 | 116 | ||
| 117 | 117 | | Benchmark | Time/op | Throughput | Bytes/op | Allocs/op | | |
| 118 | 118 | |---|---:|---:|---:|---:| | |
| 119 | - | | `Parse` (file to entries) | 3.9 µs | 744 MB/s | 10.4 KiB | 5 | | |
| 120 | - | | `Unmarshal` (file to struct, maps included) | 12.2 µs | 238 MB/s | 21.7 KiB | 47 | | |
| 121 | - | | `Decode` (5 scalar entries) | 171 ns | | 112 B | 1 | | |
| 122 | - | | `Marshal` (struct to file) | 11.6 µs | | 15.5 KiB | 19 | | |
| 123 | - | | `Set` (edit one key in place) | 2.5 µs | | 10.5 KiB | 5 | | |
| 119 | + | | `Parse` (file to entries) | 2.9 µs | 992 MB/s | 7.0 KiB | 2 | | |
| 120 | + | | `Unmarshal` (file to struct, maps included) | 8.3 µs | 351 MB/s | 13.4 KiB | 16 | | |
| 121 | + | | `Decode` (5 scalar entries) | 173 ns | | 112 B | 1 | | |
| 122 | + | | `Marshal` (struct to file) | 8.6 µs | | 6.8 KiB | 10 | | |
| 123 | + | | `Set` (edit one key in place) | 2.6 µs | | 10.5 KiB | 5 | | |
| 124 | 124 | | `Watch` (one write to one report, inotify) | 5.3 µs | | 256 B | 2 | | |
| 125 | 125 | ||
| 126 | 126 | Reproduce with: | |
| 127 | 127 | ||
| 128 | 128 | ```sh | |
| 129 | - | go test -run '^$' -bench . -benchmem -count 6 . | |
| 129 | + | go test -run '^$' -bench . -benchmem -count 10 . | |
| 130 | 130 | ``` | |
| 131 | 131 | ||
| 132 | 132 | ## License | |
| @@ -21,7 +21,7 @@ output.DP-1.scale = 1.5 | |||||
| 21 | - **Safe for real configs**: atomic saves, symlinked dotfiles, editors that | 21 | - **Safe for real configs**: atomic saves, symlinked dotfiles, editors that | ||
| 22 | save by rename, missing directories, broken files that keep the last good | 22 | save by rename, missing directories, broken files that keep the last good | ||
| 23 | config, and warnings that never print values (they may be secrets). | 23 | config, and warnings that never print values (they may be secrets). | ||
| 24 | - | - **Fast**: about 750 MB/s to parse, 2 allocations per reported change | 24 | + | - **Fast**: about 1 GB/s to parse, 2 allocations per reported change |
| 25 | (see [Performance](#performance)). | 25 | (see [Performance](#performance)). | ||
| 26 | 26 | ||||
| 27 | ```sh | 27 | ```sh | ||
| @@ -110,23 +110,23 @@ skips saves that change no value. | |||||
| 110 | 110 | ||||
| 111 | ## Performance | 111 | ## Performance | ||
| 112 | 112 | ||||
| 113 | - | Measured at `v0.1.1` (`ebc8127`, 2026-10-10) with Go 1.27.1 on linux/amd64 | 113 | + | Measured at `v0.1.2` (`1e7884d`, 2026-10-10) with Go 1.27.1 on linux/amd64 |
| 114 | - | with an AMD Ryzen 9 7900X3D. Values are medians of 6 runs. The input is a | 114 | + | with an AMD Ryzen 9 7900X3D. Values are medians of 10 runs. The input is a |
| 115 | realistic ~2.9 KB config of 100 lines with comments, 60 binds and 8 outputs. | 115 | realistic ~2.9 KB config of 100 lines with comments, 60 binds and 8 outputs. | ||
| 116 | 116 | ||||
| 117 | | Benchmark | Time/op | Throughput | Bytes/op | Allocs/op | | 117 | | Benchmark | Time/op | Throughput | Bytes/op | Allocs/op | | ||
| 118 | |---|---:|---:|---:|---:| | 118 | |---|---:|---:|---:|---:| | ||
| 119 | - | | `Parse` (file to entries) | 3.9 µs | 744 MB/s | 10.4 KiB | 5 | | 119 | + | | `Parse` (file to entries) | 2.9 µs | 992 MB/s | 7.0 KiB | 2 | |
| 120 | - | | `Unmarshal` (file to struct, maps included) | 12.2 µs | 238 MB/s | 21.7 KiB | 47 | | 120 | + | | `Unmarshal` (file to struct, maps included) | 8.3 µs | 351 MB/s | 13.4 KiB | 16 | |
| 121 | - | | `Decode` (5 scalar entries) | 171 ns | | 112 B | 1 | | 121 | + | | `Decode` (5 scalar entries) | 173 ns | | 112 B | 1 | |
| 122 | - | | `Marshal` (struct to file) | 11.6 µs | | 15.5 KiB | 19 | | 122 | + | | `Marshal` (struct to file) | 8.6 µs | | 6.8 KiB | 10 | |
| 123 | - | | `Set` (edit one key in place) | 2.5 µs | | 10.5 KiB | 5 | | 123 | + | | `Set` (edit one key in place) | 2.6 µs | | 10.5 KiB | 5 | |
| 124 | | `Watch` (one write to one report, inotify) | 5.3 µs | | 256 B | 2 | | 124 | | `Watch` (one write to one report, inotify) | 5.3 µs | | 256 B | 2 | | ||
| 125 | 125 | ||||
| 126 | Reproduce with: | 126 | Reproduce with: | ||
| 127 | 127 | ||||
| 128 | ```sh | 128 | ```sh | ||
| 129 | - | go test -run '^$' -bench . -benchmem -count 6 . | 129 | + | go test -run '^$' -bench . -benchmem -count 10 . |
| 130 | ``` | 130 | ``` | ||
| 131 | 131 | ||||
| 132 | ## License | 132 | ## License | ||