Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 123 for iota (0.03 sec)

  1. src/runtime/trace2map_test.go

    		m.Reset()
    	}
    }
    
    func TestTraceMapConcurrent(t *testing.T) {
    	var m TraceMap
    
    	var wg sync.WaitGroup
    	for i := range 3 {
    		wg.Add(1)
    		go func(i int) {
    			defer wg.Done()
    
    			si := strconv.Itoa(i)
    			var d = [...]string{
    				"a" + si,
    				"b" + si,
    				"aa" + si,
    				"ab" + si,
    				"ba" + si,
    				"bb" + si,
    			}
    			ids := make([]uint64, 0, len(d))
    			for _, s := range d {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 10 18:52:49 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  2. src/net/http/triv.go

    	n  int
    }
    
    // This makes Counter satisfy the [expvar.Var] interface, so we can export
    // it directly.
    func (ctr *Counter) String() string {
    	ctr.mu.Lock()
    	defer ctr.mu.Unlock()
    	return strconv.Itoa(ctr.n)
    }
    
    func (ctr *Counter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
    	ctr.mu.Lock()
    	defer ctr.mu.Unlock()
    	switch req.Method {
    	case "GET":
    		ctr.n++
    	case "POST":
    		var buf strings.Builder
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  3. src/debug/dwarf/typeunit.go

    		if n != Offset(uint32(n)) {
    			b.error("type unit length overflow")
    			return b.err
    		}
    		hdroff := b.off
    		vers := int(b.uint16())
    		if vers != 4 {
    			b.error("unsupported DWARF version " + strconv.Itoa(vers))
    			return b.err
    		}
    		var ao uint64
    		if !dwarf64 {
    			ao = uint64(b.uint32())
    		} else {
    			ao = b.uint64()
    		}
    		atable, err := d.parseAbbrev(ao, vers)
    		if err != nil {
    			return err
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  4. src/crypto/des/cipher.go

    	"internal/byteorder"
    	"strconv"
    )
    
    // The DES block size in bytes.
    const BlockSize = 8
    
    type KeySizeError int
    
    func (k KeySizeError) Error() string {
    	return "crypto/des: invalid key size " + strconv.Itoa(int(k))
    }
    
    // desCipher is an instance of DES encryption.
    type desCipher struct {
    	subkeys [16]uint64
    }
    
    // NewCipher creates and returns a new [cipher.Block].
    func NewCipher(key []byte) (cipher.Block, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 4K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/context.go

    func (ctxt *Context) instanceHash(orig Type, targs []Type) string {
    	assert(ctxt != nil)
    	assert(orig != nil)
    	var buf bytes.Buffer
    
    	h := newTypeHasher(&buf, ctxt)
    	h.string(strconv.Itoa(ctxt.getID(orig)))
    	// Because we've already written the unique origin ID this call to h.typ is
    	// unnecessary, but we leave it for hash readability. It can be removed later
    	// if performance is an issue.
    	h.typ(orig)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 17:29:21 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  6. src/image/geom.go

    type Point struct {
    	X, Y int
    }
    
    // String returns a string representation of p like "(3,4)".
    func (p Point) String() string {
    	return "(" + strconv.Itoa(p.X) + "," + strconv.Itoa(p.Y) + ")"
    }
    
    // Add returns the vector p+q.
    func (p Point) Add(q Point) Point {
    	return Point{p.X + q.X, p.Y + q.Y}
    }
    
    // Sub returns the vector p-q.
    func (p Point) Sub(q Point) Point {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  7. src/sort/sort_slices_benchmark_test.go

    	ints := make([]int, n)
    	for i := 0; i < n; i++ {
    		ints[i] = n - i
    	}
    	return ints
    }
    
    func makeSortedStrings(n int) []string {
    	x := make([]string, n)
    	for i := 0; i < n; i++ {
    		x[i] = strconv.Itoa(i)
    	}
    	Strings(x)
    	return x
    }
    
    const N = 100_000
    
    func BenchmarkSortInts(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		b.StopTimer()
    		ints := makeRandomInts(N)
    		b.StartTimer()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 22:59:40 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. src/cmd/internal/dwarf/putvarabbrevgen_test.go

    		}
    		return &ast.ReturnStmt{
    			Results: []ast.Expr{&ast.BinaryExpr{
    				Op: token.ADD,
    				X:  &ast.Ident{Name: "DW_ABRV_PUTVAR_START"},
    				Y:  &ast.BasicLit{Kind: token.INT, Value: strconv.Itoa(abbrevs[abbrev])}}}}
    	}
    	if pvacfg.attr != "" {
    		return pvacfgvisitnode(pvacfg.then, tag, append(path, pvacfg), abbrevs)
    	} else if pvacfg.cond != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:45:07 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  9. src/go/types/context.go

    func (ctxt *Context) instanceHash(orig Type, targs []Type) string {
    	assert(ctxt != nil)
    	assert(orig != nil)
    	var buf bytes.Buffer
    
    	h := newTypeHasher(&buf, ctxt)
    	h.string(strconv.Itoa(ctxt.getID(orig)))
    	// Because we've already written the unique origin ID this call to h.typ is
    	// unnecessary, but we leave it for hash readability. It can be removed later
    	// if performance is an issue.
    	h.typ(orig)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/fuse_test.go

    	if !ok || z0.Kind == BlockInvalid {
    		t.Errorf("case2 z0 is eliminated, but should not")
    	}
    }
    
    func BenchmarkFuse(b *testing.B) {
    	for _, n := range [...]int{1, 10, 100, 1000, 10000} {
    		b.Run(strconv.Itoa(n), func(b *testing.B) {
    			c := testConfig(b)
    
    			blocks := make([]bloc, 0, 2*n+3)
    			blocks = append(blocks,
    				Bloc("entry",
    					Valu("mem", OpInitMem, types.TypeMem, 0, nil),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:45:54 UTC 2023
    - 7.4K bytes
    - Viewed (0)
Back to top