MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / BenchmarkSimpleAbs

Function BenchmarkSimpleAbs

math/abs_test.go:40–44  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

38}
39
40func BenchmarkSimpleAbs(b *testing.B) {
41 for i := 0; i < b.N; i++ {
42 Abs(-1024)
43 }
44}
45func BenchmarkBinaryAbs32(b *testing.B) {
46 for i := 0; i < b.N; i++ {
47 binary.Abs(32, -1024)

Callers

nothing calls this directly

Calls 1

AbsFunction · 0.70

Tested by

no test coverage detected