- Sort Score
- Result 10 results
- Languages All
Results 161 - 170 of 185 for iota (0.22 sec)
-
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) -
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) -
test/typeparam/listimp2.dir/main.go
checkList(&l2, []interface{}{2}) } // Test the Transform function. func TestTransform() { l1 := a.New[int]() l1.PushBack(1) l1.PushBack(2) l2 := a.Transform(l1, strconv.Itoa) checkList(l2, []interface{}{"1", "2"}) } func main() { TestList() TestExtending() TestRemove() TestIssue4103() TestIssue6349() TestMove() TestZeroList()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 7.4K bytes - Viewed (0) -
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) -
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) -
src/cmd/trace/jsontrace_test.go
} if keep { filtered.Events = append(filtered.Events, e) } } return } func stackFrames(data *format.Data, stackID int) (frames []string) { for { frame, ok := data.Frames[strconv.Itoa(stackID)] if !ok { return } frames = append(frames, frame.Name) stackID = frame.Parent } } func checkProcStartStop(t *testing.T, data format.Data) { procStarted := map[uint64]bool{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 7.8K bytes - Viewed (0) -
src/strconv/example_test.go
c := strconv.IsPrint('\u263a') fmt.Println(c) bel := strconv.IsPrint('\007') fmt.Println(bel) // Output: // true // false } func ExampleItoa() { i := 10 s := strconv.Itoa(i) fmt.Printf("%T, %v\n", s, s) // Output: // string, 10 } func ExampleParseBool() { v := "true" if s, err := strconv.ParseBool(v); err == nil { fmt.Printf("%T, %v\n", s, s) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 22:57:37 UTC 2023 - 8.9K bytes - Viewed (0) -
src/reflect/benchmark_test.go
var cases []SelectCase for i := 0; i < 8; i++ { cases = append(cases, SelectCase{ Dir: SelectRecv, Chan: ValueOf(channel), }) } for _, numCases := range []int{1, 4, 8} { b.Run(strconv.Itoa(numCases), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { _, _, _ = Select(cases[:numCases]) } }) } } func BenchmarkCall(b *testing.B) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Nov 19 17:09:03 UTC 2023 - 8.8K bytes - Viewed (0) -
src/internal/buildcfg/cfg.go
return int(defaultGOAMD64[len("v")] - '0') } type goarmFeatures struct { Version int SoftFloat bool } func (g goarmFeatures) String() string { armStr := strconv.Itoa(g.Version) if g.SoftFloat { armStr += ",softfloat" } else { armStr += ",hardfloat" } return armStr } func goarm() (g goarmFeatures) { const ( softFloatOpt = ",softfloat"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 20:08:06 UTC 2024 - 9.5K bytes - Viewed (0) -
src/internal/concurrent/hashtriemap_test.go
gmp := runtime.GOMAXPROCS(-1) var wg sync.WaitGroup for i := range gmp { wg.Add(1) go func(id int) { defer wg.Done() makeKey := func(s string) string { return s + "-" + strconv.Itoa(id) } for _, s := range testData { key := makeKey(s) expectMissing(t, key, 0)(m.Load(key)) expectStored(t, key, id)(m.LoadOrStore(key, id)) expectPresent(t, key, id)(m.Load(key))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 16:01:55 UTC 2024 - 9.3K bytes - Viewed (0)