MCPcopy Create free account
hub / github.com/cockroachdb/apd / BenchmarkBigIntQuoRem

Function BenchmarkBigIntQuoRem

bigint_test.go:2802–2812  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

2800}
2801
2802func BenchmarkBigIntQuoRem(b *testing.B) {
2803 x, _ := new(BigInt).SetString("153980389784927331788354528594524332344709972855165340650588877572729725338415474372475094155672066328274535240275856844648695200875763869073572078279316458648124537905600131008790701752441155668003033945258023841165089852359980273279085783159654751552359397986180318708491098942831252291841441726305535546071", 0)
2804 y, _ := new(BigInt).SetString("7746362281539803897849273317883545285945243323447099728551653406505888775727297253384154743724750941556720663282745352402758568446486952008757638690735720782793164586481245379056001310087907017524411556680030339452580238411650898523599802732790857831596547515523593979861803187084910989428312522918414417263055355460715745539358014631136245887418412633787074173796862711588221766398229333338511838891484974940633857861775630560092874987828057333663969469797013996401149696897591265769095952887917296740109742927689053276850469671231961384715398038978492733178835452859452433234470997285516534065058887757272972533841547437247509415567206632827453524027585684464869520087576386907357207827931645864812453790560013100879070175244115566800303394525802384116508985235998027327908578315965475155235939798618031870849109894283125229184144172630553554607112725169432413343763989564437170644270643461665184965150423819594083121075825", 0)
2805 q := new(BigInt)
2806 r := new(BigInt)
2807
2808 b.ResetTimer()
2809 for i := 0; i < b.N; i++ {
2810 q.QuoRem(y, x, r)
2811 }
2812}
2813
2814func BenchmarkBigIntExp(b *testing.B) {
2815 x, _ := new(BigInt).SetString("11001289118363089646017359372117963499250546375269047542777928006103246876688756735760905680604646624353196869572752623285140408755420374049317646428185270079555372763503115646054602867593662923894140940837479507194934267532831694565516466765025434902348314525627418515646588160955862839022051353653052947073136084780742729727874803457643848197499548297570026926927502505634297079527299004267769780768565695459945235586892627059178884998772989397505061206395455591503771677500931269477503508150175717121828518985901959919560700853226255420793148986854391552859459511723547532575574664944815966793196961286234040892865", 0)

Callers

nothing calls this directly

Calls 2

QuoRemMethod · 0.80
SetStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…