MCPcopy
hub / github.com/shopspring/decimal / BenchmarkDecimal_Sub_same_precision

Function BenchmarkDecimal_Sub_same_precision

decimal_bench_test.go:196–205  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

194}
195
196func BenchmarkDecimal_Sub_same_precision(b *testing.B) {
197 d1 := NewFromFloat(1000.123)
198 d2 := NewFromFloat(500.123)
199
200 b.ReportAllocs()
201 b.StartTimer()
202 for i := 0; i < b.N; i++ {
203 d1.Add(d2)
204 }
205}
206
207func BenchmarkDecimal_IsInteger(b *testing.B) {
208 d := RequireFromString("12.000")

Callers

nothing calls this directly

Calls 2

NewFromFloatFunction · 0.85
AddMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…