diff options
| author | Paul Buetow <paul@buetow.org> | 2025-04-03 00:32:48 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-04-03 00:32:48 +0300 |
| commit | 8b0e8386052269e042f69c6345bd012dadb488a9 (patch) | |
| tree | c9ff633bfd1e601a7b6cd4d8d9ed0f9235ce86d5 /main_test.go | |
| parent | 1dd57067b528e1889a798a7b6d243110c87454d0 (diff) | |
add run
Diffstat (limited to 'main_test.go')
| -rw-r--r-- | main_test.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main_test.go b/main_test.go index 9af507e..49f9c13 100644 --- a/main_test.go +++ b/main_test.go @@ -2,7 +2,13 @@ package main import "testing" -func BenchmarkSilly(b *testing.B) { +func BenchmarkCPUSilly1(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = i * i + } +} + +func BenchmarkCPUSilly2(b *testing.B) { var sillyResult float64 for i := 0; i < b.N; i++ { sillyResult += float64(i) |
