Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for BenchmarkLeafSize (0.15 sec)

  1. src/math/big/natconv_test.go

    				var z nat
    				z = z.expWW(x, y)
    				z.utoa(base) // warm divisor cache
    				b.StartTimer()
    
    				for i := 0; i < b.N; i++ {
    					_ = z.utoa(base)
    				}
    			})
    		}
    	}
    }
    
    func BenchmarkLeafSize(b *testing.B) {
    	for n := 0; n <= 16; n++ {
    		b.Run(fmt.Sprint(n), func(b *testing.B) { LeafSizeHelper(b, 10, n) })
    	}
    	// Try some large lengths
    	for _, n := range []int{32, 64} {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 12:54:00 UTC 2019
    - 16.8K bytes
    - Viewed (0)
  2. src/math/big/natconv.go

    // range 2..64 shows that values of 8 and 16 work well, with a 4x speedup at medium lengths and
    // ~30x for 20000 digits. Use nat_test.go's BenchmarkLeafSize tests to optimize leafSize for
    // specific hardware.
    func (q nat) convertWords(s []byte, b Word, ndigits int, bb Word, table []divisor) {
    	// split larger blocks recursively
    	if table != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 14.6K bytes
    - Viewed (0)
Back to top