- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 329 for Map (0.09 sec)
-
src/reflect/benchmark_test.go
} func BenchmarkMap(b *testing.B) { type V *int type S string value := ValueOf((V)(nil)) stringKeys := []string{} mapOfStrings := map[string]V{} uint64Keys := []uint64{} mapOfUint64s := map[uint64]V{} userStringKeys := []S{} mapOfUserStrings := map[S]V{} for i := 0; i < 100; i++ { stringKey := fmt.Sprintf("key%d", i) stringKeys = append(stringKeys, stringKey) mapOfStrings[stringKey] = nil
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/reflect/deepequal.go
// Visited comparisons are stored in a map indexed by visit. type visit struct { a1 unsafe.Pointer a2 unsafe.Pointer typ Type } // Tests for deep equality using reflected types. The map argument tracks // comparisons that have already been seen, which allows short circuiting on // recursive types. func deepValueEqual(v1, v2 Value, visited map[visit]bool) bool { if !v1.IsValid() || !v2.IsValid() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:30 UTC 2024 - 7.4K bytes - Viewed (0) -
src/internal/concurrent/hashtriemap_test.go
}) } func testAll[K, V comparable](t *testing.T, m *HashTrieMap[K, V], testData map[K]V, yield func(K, V) bool) { for k, v := range testData { expectStored(t, k, v)(m.LoadOrStore(k, v)) } visited := make(map[K]int) m.All()(func(key K, got V) bool { want, ok := testData[key] if !ok { t.Errorf("unexpected key %v in map", key) return false } if got != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 16:01:55 UTC 2024 - 9.3K bytes - Viewed (0) -
src/maps/iter.go
// to be the same from one call to the next. func Values[Map ~map[K]V, K comparable, V any](m Map) iter.Seq[V] { return func(yield func(V) bool) { for _, v := range m { if !yield(v) { return } } } } // Insert adds the key-value pairs from seq to m. // If a key in seq already exists in m, its value will be overwritten. func Insert[Map ~map[K]V, K comparable, V any](m Map, seq iter.Seq2[K, V]) { for k, v := range seq {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 13:41:45 UTC 2024 - 1.6K bytes - Viewed (0) -
src/text/template/template.go
return t } // Funcs adds the elements of the argument map to the template's function map. // It must be called before the template is parsed. // It panics if a value in the map is not a function with appropriate return // type or if the name cannot be used syntactically as a function in a template. // It is legal to overwrite elements of the map. The return value is the template, // so calls can be chained.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:57:51 UTC 2024 - 7.2K bytes - Viewed (0) -
src/cmd/compile/internal/types/pkg.go
// instantiations. p.Prefix = path } else { p.Prefix = objabi.PathToPrefix(path) } p.Syms = make(map[string]*Sym) pkgMap[path] = p return p } func PkgMap() map[string]*Pkg { return pkgMap } var nopkg = &Pkg{ Syms: make(map[string]*Sym), } func (pkg *Pkg) Lookup(name string) *Sym { s, _ := pkg.LookupOK(name) return s }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 16:28:50 UTC 2023 - 3.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/validate.go
func Validate(analyzers []*Analyzer) error { // Map each fact type to its sole generating analyzer. factTypes := make(map[reflect.Type]*Analyzer) // Traverse the Requires graph, depth first. const ( white = iota grey black finished ) color := make(map[*Analyzer]uint8) var visit func(a *Analyzer) error visit = func(a *Analyzer) error { if a == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 21:52:54 UTC 2023 - 3.1K bytes - Viewed (0) -
test/fixedbugs/issue63505.go
package main type explainer struct { m map[string]string } func init() { RegisterExplainer(newExplainer()) } type Explainer interface { Name() string Map() map[string]string } func (e explainer) Name() string { return "HelloWorldExplainer" } func (e explainer) Map() map[string]string { return e.m } //go:noinline func newExplainer() explainer {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 00:48:31 UTC 2023 - 736 bytes - Viewed (0) -
src/cmd/compile/internal/ssagen/nowb.go
// get back to the ODCLFUNCs. symToFunc := make(map[*obj.LSym]*ir.Func) // funcs records the back-edges of the BFS call graph walk. It // maps from the ODCLFUNC of each function that must not have // write barriers to the call that inhibits them. Functions // that are directly marked go:nowritebarrierrec are in this // map with a zero-valued nowritebarrierrecCall. This also
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 17:29:46 UTC 2024 - 5.9K bytes - Viewed (0) -
src/cmd/compile/internal/types2/context.go
// The use of a shared context does not guarantee that identical instances are // deduplicated in all cases. type Context struct { mu sync.Mutex typeMap map[string][]ctxtEntry // type hash -> instances entries nextID int // next unique ID originIDs map[Type]int // origin type -> unique ID } type ctxtEntry struct { orig Type targs []Type instance Type // = orig[targs] }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:29:21 UTC 2023 - 4.3K bytes - Viewed (0)