- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 6,177 for i$ (0.03 sec)
-
src/runtime/map_benchmark_test.go
m := make(map[string]bool) for i := 0; i < 8; i++ { m[strings.Repeat("K", i+1)] = true } key := strings.Repeat("K", keySize) b.ResetTimer() for i := 0; i < b.N; i++ { _ = m[key] } } func BenchmarkIntMap(b *testing.B) { m := make(map[int]bool) for i := 0; i < 8; i++ { m[i] = true } b.ResetTimer() for i := 0; i < b.N; i++ { _, _ = m[7] } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 09 16:41:16 UTC 2023 - 10.6K bytes - Viewed (0) -
src/math/all_test.go
} } for i := 0; i < len(vfasinhSC); i++ { if f := Asinh(vfasinhSC[i]); !alike(asinhSC[i], f) { t.Errorf("Asinh(%g) = %g, want %g", vfasinhSC[i], f, asinhSC[i]) } } } func TestAtan(t *testing.T) { for i := 0; i < len(vf); i++ { if f := Atan(vf[i]); !veryclose(atan[i], f) { t.Errorf("Atan(%g) = %g, want %g", vf[i], f, atan[i]) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jul 07 17:39:26 UTC 2023 - 86.8K bytes - Viewed (0) -
src/sort/sort_slices_benchmark_test.go
r := rand.New(rand.NewPCG(42, 0)) ints := make([]int, n) for i := 0; i < n; i++ { ints[i] = r.IntN(n) } return ints } func makeSortedInts(n int) []int { ints := make([]int, n) for i := 0; i < n; i++ { ints[i] = i } return ints } func makeReversedInts(n int) []int { ints := make([]int, n) for i := 0; i < n; i++ { ints[i] = n - i } return ints }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 08 22:59:40 UTC 2024 - 4K bytes - Viewed (0) -
src/reflect/iter_test.go
{"func", ValueOf(func(f func(int, int) bool) { for i := range 4 { f(i, i+1) } }), func(t *testing.T, s iter.Seq2[Value, Value]) { i := int64(0) for v1, v2 := range s { if v1.Int() != i { t.Fatalf("got %d, want %d", v1.Int(), i) } i++ if v2.Int() != i { t.Fatalf("got %d, want %d", v2.Int(), i) } } if i != 4 { t.Fatalf("should loop four times") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 14:27:54 UTC 2024 - 6.4K bytes - Viewed (0) -
test/checkbce.go
a[5] = 1 a[5] = 1 } func f1(a [256]int, i int) { var j int useInt(a[i]) // ERROR "Found IsInBounds$" j = i % 256 useInt(a[j]) // ERROR "Found IsInBounds$" j = i & 255 useInt(a[j]) j = i & 17 useInt(a[j]) if 4 <= i && i < len(a) { useInt(a[i]) useInt(a[i-1]) useInt(a[i-4]) } } func f2(a [256]int, i uint) { useInt(a[i]) // ERROR "Found IsInBounds$" j := i % 256
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 3.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java
public void testGetSet() { AtomicDoubleArray aa = new AtomicDoubleArray(VALUES.length); for (int i = 0; i < VALUES.length; i++) { assertBitEquals(0.0, aa.get(i)); aa.set(i, VALUES[i]); assertBitEquals(VALUES[i], aa.get(i)); aa.set(i, -3.0); assertBitEquals(-3.0, aa.get(i)); } } /** get returns the last value lazySet at index by same thread */
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Feb 13 14:28:25 UTC 2024 - 14.5K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/text/unicode/norm/iter.go
} if i.rb.src.str[p] < utf8.RuneSelf { i.buf[0] = i.rb.src.str[i.p] i.p = p return i.buf[:1] } i.info = i.rb.f.info(i.rb.src, i.p) i.next = i.rb.f.nextMain return i.next(i) } func nextHangul(i *Iter) []byte { p := i.p next := p + hangulUTF8Size if next >= i.rb.nsrc { i.setDone() } else if i.rb.src.hangul(next) == 0 { i.rb.ss.next(i.info)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 13:01:26 UTC 2024 - 11K bytes - Viewed (0) -
src/sync/atomic/atomic_test.go
func TestAndInt32(t *testing.T) { var x struct { before int32 i int32 after int32 } x.before = magic32 x.after = magic32 x.i = -1 j := x.i for mask := int32(1); mask != 0; mask <<= 1 { old := x.i k := AndInt32(&x.i, ^mask) j &= ^mask if x.i != j || k != old { t.Fatalf("mask=%d i=%d j=%d k=%d old=%d", mask, x.i, j, k, old) } } if x.before != magic32 || x.after != magic32 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:37:29 UTC 2024 - 71.4K bytes - Viewed (0) -
src/math/huge_test.go
func TestHugeCos(t *testing.T) { for i := 0; i < len(trigHuge); i++ { f1 := cosHuge[i] f2 := Cos(trigHuge[i]) if !close(f1, f2) { t.Errorf("Cos(%g) = %g, want %g", trigHuge[i], f2, f1) } f3 := Cos(-trigHuge[i]) if !close(f1, f3) { t.Errorf("Cos(%g) = %g, want %g", -trigHuge[i], f3, f1) } } } func TestHugeSin(t *testing.T) { for i := 0; i < len(trigHuge); i++ { f1 := sinHuge[i]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jul 31 16:23:41 UTC 2023 - 2.9K bytes - Viewed (0) -
src/strconv/itoa.go
return append(dst, small(int(i))...) } dst, _ = formatBits(dst, i, base, false, true) return dst } // small returns the string for an i with 0 <= i < nSmalls. func small(i int) string { if i < 10 { return digits[i : i+1] } return smallsString[i*2 : i*2+2] } const nSmalls = 100 const smallsString = "00010203040506070809" + "10111213141516171819" + "20212223242526272829" +
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:21:28 UTC 2024 - 5.3K bytes - Viewed (0)