- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 69 for GetBytes (0.14 sec)
-
internal/grid/benchmark_test.go
defer timeout(60 * time.Second)() ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() b.ReportAllocs() b.SetBytes(int64(len(payload) * 2)) b.ResetTimer() t := time.Now() var ops int64 var lat int64 b.SetParallelism(par) b.RunParallel(func(pb *testing.PB) {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.7K bytes - Viewed (0) -
src/crypto/internal/edwards25519/field/fe.go
} // Set sets v = a, and returns v. func (v *Element) Set(a *Element) *Element { *v = *a return v } // SetBytes sets v to x, where x is a 32-byte little-endian encoding. If x is // not of the right length, SetBytes returns nil and an error, and the // receiver is unchanged. // // Consistent with RFC 7748, the most significant bit (the high bit of the
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 11.8K bytes - Viewed (0) -
src/image/gif/writer_test.go
paletted := image.NewPaletted(image.Rect(0, 0, 640, 480), palette.Plan9) rnd := rand.New(rand.NewSource(123)) for i := range paletted.Pix { paletted.Pix[i] = uint8(rnd.Intn(256)) } b.SetBytes(640 * 480 * 1) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { Encode(io.Discard, paletted, nil) } } func BenchmarkEncodeRandomRGBA(b *testing.B) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 19K bytes - Viewed (0) -
internal/config/crypto_test.go
} benchmarkEncrypt := func(size int, b *testing.B) { var ( data = make([]byte, size) plaintext = bytes.NewReader(data) context = kms.Context{"key": "value"} ) b.SetBytes(int64(size)) for i := 0; i < b.N; i++ { ciphertext, err := Encrypt(KMS, plaintext, context) if err != nil { b.Fatal(err) } if _, err = io.Copy(io.Discard, ciphertext); err != nil {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 3.2K bytes - Viewed (0) -
src/crypto/internal/bigmod/nat.go
} bytes[i] = byte(limb) limb >>= 8 } } return bytes } // SetBytes assigns x = b, where b is a slice of big-endian bytes. // SetBytes returns an error if b >= m. // // The output will be resized to the size of m and overwritten. func (x *Nat) SetBytes(b []byte, m *Modulus) (*Nat, error) { if err := x.setBytes(b, m); err != nil { return nil, err } if x.cmpGeq(m.nat) == yes {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 24K bytes - Viewed (0) -
src/index/suffixarray/suffixarray_test.go
b.StopTimer() data := benchdata if random { data = benchrand if data[0] == 0 { for i := range data { data[i] = byte(rand.Intn(256)) } } } b.StartTimer() b.SetBytes(int64(len(data))) for i := 0; i < b.N; i++ { New(data) } } func makeText(name string) ([]byte, error) { var data []byte switch name { case "opticks": var err error
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 14.1K bytes - Viewed (0) -
src/bytes/buffer_test.go
} } func BenchmarkWriteByte(b *testing.B) { const n = 4 << 10 b.SetBytes(n) buf := NewBuffer(make([]byte, n)) for i := 0; i < b.N; i++ { buf.Reset() for i := 0; i < n; i++ { buf.WriteByte('x') } } } func BenchmarkWriteRune(b *testing.B) { const n = 4 << 10 const r = '☺' b.SetBytes(int64(n * utf8.RuneLen(r))) buf := NewBuffer(make([]byte, n*utf8.UTFMax))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 13:31:36 UTC 2024 - 18.6K bytes - Viewed (0) -
src/crypto/rsa/rsa.go
if err != nil { return nil, ErrDecryption } c, err = bigmod.NewNat().SetBytes(ciphertext, N) if err != nil { return nil, ErrDecryption } m = bigmod.NewNat().Exp(c, priv.D.Bytes(), N) } else { N = priv.Precomputed.n P, Q := priv.Precomputed.p, priv.Precomputed.q Qinv, err := bigmod.NewNat().SetBytes(priv.Precomputed.Qinv.Bytes(), P) if err != nil { return nil, ErrDecryption }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 23.4K bytes - Viewed (0) -
src/math/big/floatmarsh.go
if z.form == finite { if len(buf) < 10 { return errors.New("Float.GobDecode: buffer too small for finite form float") } z.exp = int32(byteorder.BeUint32(buf[6:])) z.mant = z.mant.setBytes(buf[10:]) } if oldPrec != 0 { z.mode = oldMode z.SetPrec(uint(oldPrec)) } if msg := z.validate0(); msg != "" { return errors.New("Float.GobDecode: " + msg) } return nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:31:58 UTC 2024 - 3.6K bytes - Viewed (0) -
src/encoding/base32/base32_test.go
func BenchmarkEncode(b *testing.B) { data := make([]byte, 8192) buf := make([]byte, StdEncoding.EncodedLen(len(data))) b.SetBytes(int64(len(data))) for i := 0; i < b.N; i++ { StdEncoding.Encode(buf, data) } } func BenchmarkEncodeToString(b *testing.B) { data := make([]byte, 8192) b.SetBytes(int64(len(data))) for i := 0; i < b.N; i++ { StdEncoding.EncodeToString(data) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 16:25:54 UTC 2024 - 26K bytes - Viewed (0)