Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for BenchmarkMul (0.31 sec)

  1. src/crypto/internal/nistec/fiat/fiat_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package fiat_test
    
    import (
    	"crypto/internal/nistec/fiat"
    	"testing"
    )
    
    func BenchmarkMul(b *testing.B) {
    	b.Run("P224", func(b *testing.B) {
    		v := new(fiat.P224Element).One()
    		b.ReportAllocs()
    		b.ResetTimer()
    		for i := 0; i < b.N; i++ {
    			v.Mul(v, v)
    		}
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 05 21:53:03 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  2. src/math/big/calibrate_test.go

    	}
    	if maxSqr != 0 {
    		fmt.Printf("found karatsubaSqrThreshold = %d\n", maxSqr)
    	} else {
    		fmt.Println("no karatsubaSqrThreshold found")
    	}
    }
    
    func karatsubaLoad(b *testing.B) {
    	BenchmarkMul(b)
    }
    
    // measureKaratsuba returns the time to run a Karatsuba-relevant benchmark
    // given Karatsuba threshold th.
    func measureKaratsuba(th int) time.Duration {
    	th, karatsubaThreshold = karatsubaThreshold, th
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  3. src/math/big/nat_test.go

    }
    
    // rndNat1 is like rndNat but the result is guaranteed to be > 0.
    func rndNat1(n int) nat {
    	x := nat(rndV(n)).norm()
    	if len(x) == 0 {
    		x.setWord(1)
    	}
    	return x
    }
    
    func BenchmarkMul(b *testing.B) {
    	mulx := rndNat(1e4)
    	muly := rndNat(1e4)
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		var z nat
    		z.mul(mulx, muly)
    	}
    }
    
    func benchmarkNatMul(b *testing.B, nwords int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 09 15:29:36 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  4. src/math/bits/bits_test.go

    		z0, c = Sub64(z0, uint64(i), c)
    		z1, c = Sub64(z1, uint64(i), c)
    		z2, c = Sub64(z2, uint64(i), c)
    		z3, _ = Sub64(z3, uint64(i), c)
    	}
    	Output = int(z0 + z1 + z2 + z3)
    }
    
    func BenchmarkMul(b *testing.B) {
    	var hi, lo uint
    	for i := 0; i < b.N; i++ {
    		hi, lo = Mul(uint(Input), uint(i))
    	}
    	Output = int(hi + lo)
    }
    
    func BenchmarkMul32(b *testing.B) {
    	var hi, lo uint32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 22 20:11:06 UTC 2020
    - 32.5K bytes
    - Viewed (0)
Back to top