Skip to content

Commit 503b262

Browse files
committed
Update benchmark
1 parent b696189 commit 503b262

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Diff for: Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ repl: gosch
4949
fmt:
5050
go fmt ./...
5151

52+
.PHONY: lines
53+
lines:
54+
@ find . -type f \( -name "*.go" -not -name "*_test.go" \) -exec cat {} \; | grep . | wc -l
55+
5256
.PHONY: clean
5357
clean:
5458
rm -rf *.out *.html ./gosch

Diff for: examples/the-little-schemer/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ The unit tests are adapted from the code found in the https://github.com/bmitc/t
66
I used this code to run a benchmark against MIT Scheme:
77

88
```shell
9-
$ hyperfine '../../gosch run-all.scm' 'scheme --quiet < run-all.scm'
9+
$ hyperfine --warmup 1 '../../gosch run-all.scm' 'scheme --quiet < run-all.scm'
1010
Benchmark 1: ../../gosch run-all.scm
11-
Time (mean ± σ): 95.0 ms ± 4.6 ms [User: 105.5 ms, System: 8.1 ms]
12-
Range (min … max): 86.6 ms … 105.1 ms 28 runs
11+
Time (mean ± σ): 73.3 ms ± 3.3 ms [User: 86.6 ms, System: 8.4 ms]
12+
Range (min … max): 68.1 ms … 79.3 ms 39 runs
1313

1414
Benchmark 2: scheme --quiet < run-all.scm
15-
Time (mean ± σ): 358.2 ms ± 31.7 ms [User: 333.9 ms, System: 23.9 ms]
16-
Range (min … max): 331.8 ms … 436.9 ms 10 runs
15+
Time (mean ± σ): 206.1 ms ± 2.4 ms [User: 160.7 ms, System: 45.3 ms]
16+
Range (min … max): 202.7 ms … 211.0 ms 14 runs
1717

1818
Summary
1919
'../../gosch run-all.scm' ran
20-
3.77 ± 0.38 times faster than 'scheme --quiet < run-all.scm'
20+
2.81 ± 0.13 times faster than 'scheme --quiet < run-all.scm'
2121
```

0 commit comments

Comments
 (0)