From 87790b809b07108db9c275fc8d09b6cf1339ffa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9?= Date: Sun, 21 Jul 2024 18:27:11 +0200 Subject: [PATCH] Add AppendInt function with positive/negative number convertion to string Benchmark_ItoA/fiber (pos_num)-12 190428255 6.13 ns/op 0 B/op 0 allocs/op Benchmark_ItoA/fiber (pos_num)-12 196626811 6.08 ns/op 0 B/op 0 allocs/op Benchmark_ItoA/strconv.Itoa (pos_num)-12 80716807 14.33 ns/op 4 B/op 1 allocs/op Benchmark_ItoA/strconv.Itoa (pos_num)-12 80445802 14.30 ns/op 4 B/op 1 allocs/op Benchmark_ItoA/strconv.FormatInt_(pos_num)-12 81137728 14.30 ns/op 4 B/op 1 allocs/op Benchmark_ItoA/strconv.FormatInt_(pos_num)-12 81345360 14.49 ns/op 4 B/op 1 allocs/op Benchmark_ItoA/fiber (neg_num)-12 151121002 7.81 ns/op 0 B/op 0 allocs/op Benchmark_ItoA/fiber (neg_num)-12 153566410 7.70 ns/op 0 B/op 0 allocs/op Benchmark_ItoA/strconv.Itoa (neg_num)-12 84505304 13.75 ns/op 5 B/op 1 allocs/op Benchmark_ItoA/strconv.Itoa (neg_num)-12 82524801 13.76 ns/op 5 B/op 1 allocs/op Benchmark_ItoA/strconv.FormatInt (neg_num)-12 84884136 13.88 ns/op 5 B/op 1 allocs/op Benchmark_ItoA/strconv.FormatInt (neg_num)-12 85829492 13.76 ns/op 5 B/op 1 allocs/op --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d9257e..e244c1e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ pkg: github.com/gofiber/utils cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz ```go -// go test -benchmem -run=^$ -bench=Benchmark -count=2 +// go test -benchmem -run=^$ -bench=Benchmark_ -count=2 Benchmark_ToLowerBytes/fiber-12 29715831 36.44 ns/op 0 B/op 0 allocs/op Benchmark_ToLowerBytes/fiber-12 33316479 36.28 ns/op 0 B/op 0 allocs/op