Skip to content

add benchmark tests#11

Open
thaJeztah wants to merge 1 commit intomorikuni:masterfrom
thaJeztah:add_bench_tests
Open

add benchmark tests#11
thaJeztah wants to merge 1 commit intomorikuni:masterfrom
thaJeztah:add_bench_tests

Conversation

@thaJeztah
Copy link
Copy Markdown

goos: darwin
goarch: arm64
pkg: github.com/morikuni/aec
cpu: Apple M3 Pro

BenchmarkCursor/0           1000000000     1.082 ns/op     0 B/op      0 allocs/op
BenchmarkCursor/1           19155609       68.19 ns/op     20 B/op     2 allocs/op
BenchmarkCursor/2           18512708       70.56 ns/op     20 B/op     2 allocs/op
BenchmarkCursor/20          17439208       71.64 ns/op     21 B/op     2 allocs/op
BenchmarkCursor/200         15858112       72.50 ns/op     24 B/op     2 allocs/op

BenchmarkPosition/0,0       13222344       92.66 ns/op     24 B/op     2 allocs/op
BenchmarkPosition/1,1       13894000       92.44 ns/op     24 B/op     2 allocs/op
BenchmarkPosition/2,2       12211875       94.83 ns/op     24 B/op     2 allocs/op
BenchmarkPosition/20,20     12199171       95.88 ns/op     24 B/op     2 allocs/op
BenchmarkPosition/200,200   12728629       100.7 ns/op     32 B/op     2 allocs/op
BenchmarkPosition/5,15      12093298       96.45 ns/op     24 B/op     2 allocs/op

BenchmarkEraseDisplay/0     15354889       84.39 ns/op     20 B/op     2 allocs/op
BenchmarkEraseDisplay/1     14803665       84.80 ns/op     20 B/op     2 allocs/op
BenchmarkEraseDisplay/2     14292037       81.21 ns/op     20 B/op     2 allocs/op
BenchmarkEraseDisplay/3     14696929       73.16 ns/op     20 B/op     2 allocs/op
BenchmarkEraseDisplay/20    16980390       73.61 ns/op     21 B/op     2 allocs/op
BenchmarkEraseDisplay/200   13056309       82.76 ns/op     24 B/op     2 allocs/op

BenchmarkScrollUpDown/0     1000000000     1.101 ns/op     0 B/op      0 allocs/op
BenchmarkScrollUpDown/1     18142771       68.53 ns/op     20 B/op     2 allocs/op
BenchmarkScrollUpDown/2     18104678       67.67 ns/op     20 B/op     2 allocs/op
BenchmarkScrollUpDown/20    16923913       70.32 ns/op     21 B/op     2 allocs/op
BenchmarkScrollUpDown/200   16939790       70.74 ns/op     24 B/op     2 allocs/op

BenchmarkBuilderFluent      1806829        671.0 ns/op     560 B/op    29 allocs/op
BenchmarkBuilderWith        3688992        326.4 ns/op     312 B/op    12 allocs/op

BenchmarkColor3BitF         13278399       87.57 ns/op     21 B/op     2 allocs/op
BenchmarkColor8BitF         13405442       93.59 ns/op     32 B/op     2 allocs/op
BenchmarkFullColorF         9992067        120.7 ns/op     40 B/op     2 allocs/op

PASS
ok   github.com/morikuni/aec   35.885s

```
goos: darwin
goarch: arm64
pkg: github.com/morikuni/aec
cpu: Apple M3 Pro

BenchmarkCursor/0           1000000000     1.082 ns/op     0 B/op      0 allocs/op
BenchmarkCursor/1           19155609       68.19 ns/op     20 B/op     2 allocs/op
BenchmarkCursor/2           18512708       70.56 ns/op     20 B/op     2 allocs/op
BenchmarkCursor/20          17439208       71.64 ns/op     21 B/op     2 allocs/op
BenchmarkCursor/200         15858112       72.50 ns/op     24 B/op     2 allocs/op

BenchmarkPosition/0,0       13222344       92.66 ns/op     24 B/op     2 allocs/op
BenchmarkPosition/1,1       13894000       92.44 ns/op     24 B/op     2 allocs/op
BenchmarkPosition/2,2       12211875       94.83 ns/op     24 B/op     2 allocs/op
BenchmarkPosition/20,20     12199171       95.88 ns/op     24 B/op     2 allocs/op
BenchmarkPosition/200,200   12728629       100.7 ns/op     32 B/op     2 allocs/op
BenchmarkPosition/5,15      12093298       96.45 ns/op     24 B/op     2 allocs/op

BenchmarkEraseDisplay/0     15354889       84.39 ns/op     20 B/op     2 allocs/op
BenchmarkEraseDisplay/1     14803665       84.80 ns/op     20 B/op     2 allocs/op
BenchmarkEraseDisplay/2     14292037       81.21 ns/op     20 B/op     2 allocs/op
BenchmarkEraseDisplay/3     14696929       73.16 ns/op     20 B/op     2 allocs/op
BenchmarkEraseDisplay/20    16980390       73.61 ns/op     21 B/op     2 allocs/op
BenchmarkEraseDisplay/200   13056309       82.76 ns/op     24 B/op     2 allocs/op

BenchmarkScrollUpDown/0     1000000000     1.101 ns/op     0 B/op      0 allocs/op
BenchmarkScrollUpDown/1     18142771       68.53 ns/op     20 B/op     2 allocs/op
BenchmarkScrollUpDown/2     18104678       67.67 ns/op     20 B/op     2 allocs/op
BenchmarkScrollUpDown/20    16923913       70.32 ns/op     21 B/op     2 allocs/op
BenchmarkScrollUpDown/200   16939790       70.74 ns/op     24 B/op     2 allocs/op

BenchmarkBuilderFluent      1806829        671.0 ns/op     560 B/op    29 allocs/op
BenchmarkBuilderWith        3688992        326.4 ns/op     312 B/op    12 allocs/op

BenchmarkColor3BitF         13278399       87.57 ns/op     21 B/op     2 allocs/op
BenchmarkColor8BitF         13405442       93.59 ns/op     32 B/op     2 allocs/op
BenchmarkFullColorF         9992067        120.7 ns/op     40 B/op     2 allocs/op

PASS
ok   github.com/morikuni/aec   35.885s
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Copy Markdown
Author

I'm working on some changes and improvements as a bit of a weekend fun project; adding some test-coverage first 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant