summaryrefslogtreecommitdiff
path: root/main_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-04-03 00:32:48 +0300
committerPaul Buetow <paul@buetow.org>2025-04-03 00:32:48 +0300
commit8b0e8386052269e042f69c6345bd012dadb488a9 (patch)
treec9ff633bfd1e601a7b6cd4d8d9ed0f9235ce86d5 /main_test.go
parent1dd57067b528e1889a798a7b6d243110c87454d0 (diff)
add run
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go8
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)