Skip to content

Commit 55ec4e0

Browse files
committed
docs: add benchmark section to README
Adds a benchmark section to the README comparing the Go and Rust implementations of auto-commit-msg, using hyperfine for benchmarking. Also updates the .gitignore to include benchmark results and adds hyperfine to the devenv.nix configuration. --- {"auto-commit-msg":{"language":"rust","version":"0.4.0-dev","model":"gemini-2.5-flash-lite","response_time":1.31,"execution_time":1.33}}
1 parent 63cc3c4 commit 55ec4e0

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ devenv.local.nix
1111
# Project specific
1212
.env
1313
auto-commit-msg
14+
benchmark.md
1415
result
1516
templates/default/devenv.lock
1617

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ commit` without a commit message generates a commit message. If a commit message
109109
is given, `auto-commit-msg` does not generate a commit message and instead uses
110110
the one provided by the user.
111111

112+
## Benchmark
113+
114+
The following table compares the Go and Rust implementations; it was built using
115+
[hyperfine](https://github.com/sharkdp/hyperfine).
116+
117+
| Command | Mean [s] | Min [s] | Max [s] | Relative |
118+
|:---|---:|---:|---:|---:|
119+
| `./auto-commit-msg` | 1.101 ± 0.205 | 0.776 | 1.309 | 1.00 |
120+
| `./rust/target/release/acm` | 1.244 ± 0.106 | 1.127 | 1.416 | 1.13 ± 0.23 |
121+
112122
## License
113123

114124
[MIT](LICENSE)

devenv.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
pkgs.gitleaks
1515
pkgs.gomod2nix
1616
pkgs.goreleaser
17+
pkgs.hyperfine
1718
pkgs.secretspec
1819
];
1920

0 commit comments

Comments
 (0)