Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AppendInt function with positive/negative number convertion to string #90

Closed
wants to merge 5 commits into from
Prev Previous commit
Next Next commit
Add AppendInt function with positive/negative number convertion to st…
…ring

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
ReneWerner87 committed Jul 21, 2024
commit 87790b809b07108db9c275fc8d09b6cf1339ffa8
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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