aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-09-05 09:33:42 +0200
committerDennis Eriksen <d@ennis.no>2023-09-05 09:33:42 +0200
commita5b608b3f120dca3f1fa2e44e7631aabdfbd1bc5 (patch)
tree63efd1d01bb5828d008293634f13992f5398a65d /README.md
parentadding licence (diff)
downloadmakepass-a5b608b3f120dca3f1fa2e44e7631aabdfbd1bc5.tar.gz
adding golang-version
Diffstat (limited to 'README.md')
-rw-r--r--README.md58
1 files changed, 42 insertions, 16 deletions
diff --git a/README.md b/README.md
index 93bd739..6258c88 100644
--- a/README.md
+++ b/README.md
@@ -82,26 +82,52 @@ nice job.
Here are the results so far:
```
-% hyperfine --time-unit=millisecond --warmup=1 --shell=none ./*(.)
+% hyperfine --time-unit=millisecond --warmup=1 --shell=none ./makepass.*
Benchmark 1: ./makepass.bash
- Time (mean ± σ): 469.3 ms ± 3.6 ms [User: 92.0 ms, System: 734.0 ms]
- Range (min … max): 463.6 ms … 474.3 ms 10 runs
+ Time (mean ± σ): 422.7 ms ± 3.1 ms [User: 95.0 ms, System: 659.0 ms]
+ Range (min … max): 417.9 ms … 428.3 ms 10 runs
-Benchmark 2: ./makepass.pl
- Time (mean ± σ): 38.8 ms ± 0.4 ms [User: 18.2 ms, System: 19.0 ms]
- Range (min … max): 38.1 ms … 40.1 ms 77 runs
+Benchmark 2: ./makepass.go
+ Time (mean ± σ): 6.9 ms ± 0.2 ms [User: 1.1 ms, System: 4.7 ms]
+ Range (min … max): 6.3 ms … 8.1 ms 434 runs
-Benchmark 3: ./makepass.sh
- Time (mean ± σ): 1261.6 ms ± 18.5 ms [User: 298.0 ms, System: 2030.0 ms]
- Range (min … max): 1237.4 ms … 1291.8 ms 10 runs
+Benchmark 3: ./makepass.pl
+ Time (mean ± σ): 36.2 ms ± 0.4 ms [User: 17.8 ms, System: 16.2 ms]
+ Range (min … max): 35.6 ms … 37.9 ms 82 runs
-Benchmark 4: ./makepass.zsh
- Time (mean ± σ): 27.2 ms ± 0.7 ms [User: 12.0 ms, System: 13.0 ms]
- Range (min … max): 25.5 ms … 29.1 ms 111 runs
+Benchmark 4: ./makepass.sh
+ Time (mean ± σ): 1107.7 ms ± 15.3 ms [User: 276.0 ms, System: 1790.0 ms]
+ Range (min … max): 1084.9 ms … 1140.3 ms 10 runs
+
+Benchmark 5: ./makepass.zsh
+ Time (mean ± σ): 25.3 ms ± 0.7 ms [User: 12.7 ms, System: 10.8 ms]
+ Range (min … max): 23.6 ms … 27.7 ms 114 runs
Summary
- './makepass.zsh' ran
- 1.43 ± 0.04 times faster than './makepass.pl'
- 17.27 ± 0.49 times faster than './makepass.bash'
- 46.43 ± 1.43 times faster than './makepass.sh'
+ './makepass.go' ran
+ 3.69 ± 0.15 times faster than './makepass.zsh'
+ 5.28 ± 0.17 times faster than './makepass.pl'
+ 61.62 ± 1.86 times faster than './makepass.bash'
+ 161.48 ± 5.22 times faster than './makepass.sh'
+```
+
+## Versions
+
+### Bash
+This version needs a bit more work.
+
+### Go
+Build width (from root folder in repo):
```
+$ go build -o ../makepass.go -C go/ -ldflags "-s -w" makepass.go
+```
+
+### Perl
+Perl version. I like this version.
+
+### Shell
+Needs more work.
+
+### Zsh
+This is currently the "main" version. It uses pure zsh, with no forking out to
+other programs. As of adding the go-version, it is the second fastest version.