Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for stringHash (0.22 sec)

  1. src/runtime/alg.go

    // Testing adapters for hash quality tests (see hash_test.go)
    //
    // stringHash should be an internal detail,
    // but widely used packages access it using linkname.
    // Notable members of the hall of shame include:
    //   - github.com/k14s/starlark-go
    //
    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    //go:linkname stringHash
    func stringHash(s string, seed uintptr) uintptr {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  2. src/runtime/hash_test.go

    }
    func (s *HashSet) add(h uintptr) {
    	s.list = append(s.list, h)
    }
    func (s *HashSet) addS(x string) {
    	s.add(StringHash(x, 0))
    }
    func (s *HashSet) addB(x []byte) {
    	s.add(BytesHash(x, 0))
    }
    func (s *HashSet) addS_seed(x string, seed uintptr) {
    	s.add(StringHash(x, seed))
    }
    func (s *HashSet) check(t *testing.T) {
    	list := s.list
    	slices.Sort(list)
    
    	collisions := 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 17:50:18 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  3. src/hash/maphash/smhasher_test.go

    					t.Errorf("hash depends on bytes outside key")
    				}
    			}
    		}
    	}
    }
    
    func bytesHash(b []byte) uint64 {
    	var h Hash
    	h.SetSeed(fixedSeed)
    	h.Write(b)
    	return h.Sum64()
    }
    func stringHash(s string) uint64 {
    	var h Hash
    	h.SetSeed(fixedSeed)
    	h.WriteString(s)
    	return h.Sum64()
    }
    
    const hashSize = 64
    
    func randBytes(r *rand.Rand, b []byte) {
    	r.Read(b) // can't fail
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:41:38 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. src/runtime/export_test.go

    			}
    			done <- true
    		}()
    		for atomic.Xadd(ready, 1); atomic.Load(ready) != 2; {
    		}
    		runqput(p, &gs[1], next1)
    		runqget(p)
    		<-done
    		runqget(p)
    	}
    }
    
    var (
    	StringHash = stringHash
    	BytesHash  = bytesHash
    	Int32Hash  = int32Hash
    	Int64Hash  = int64Hash
    	MemHash    = memhash
    	MemHash32  = memhash32
    	MemHash64  = memhash64
    	EfaceHash  = efaceHash
    	IfaceHash  = ifaceHash
    )
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  5. internal/s3select/sql/funceval.go

    	case castInt, castInteger:
    		i, err := intCast(v)
    		return FromInt(i), err
    
    	case castFloat:
    		f, err := floatCast(v)
    		return FromFloat(f), err
    
    	case castString:
    		s, err := stringCast(v)
    		return FromString(s), err
    
    	case castTimestamp:
    		t, err := timestampCast(v)
    		return FromTimestamp(t), err
    
    	case castBool:
    		b, err := boolCast(v)
    		return FromBool(b), err
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 13.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

      public void testInvokeAnyImpl() throws Exception {
        ListeningExecutorService e = newDirectExecutorService();
        try {
          List<Callable<String>> l = new ArrayList<>();
          l.add(new StringTask());
          l.add(new StringTask());
          String result = invokeAnyImpl(e, l, false, 0, TimeUnit.NANOSECONDS);
          assertSame(TEST_STRING, result);
        } finally {
          joinPool(e);
        }
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 28.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

      public void testInvokeAnyImpl() throws Exception {
        ListeningExecutorService e = newDirectExecutorService();
        try {
          List<Callable<String>> l = new ArrayList<>();
          l.add(new StringTask());
          l.add(new StringTask());
          String result = invokeAnyImpl(e, l, false, 0, TimeUnit.NANOSECONDS);
          assertSame(TEST_STRING, result);
        } finally {
          joinPool(e);
        }
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 28.2K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        @Override
        public Object call() {
          return Boolean.TRUE;
        }
      }
    
      public static final String TEST_STRING = "a test string";
    
      public static class StringTask implements Callable<String> {
        @Override
        public String call() {
          return TEST_STRING;
        }
      }
    
      public Callable<String> latchAwaitingStringTask(final CountDownLatch latch) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 17:15:24 UTC 2024
    - 37.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        @Override
        public Object call() {
          return Boolean.TRUE;
        }
      }
    
      public static final String TEST_STRING = "a test string";
    
      public static class StringTask implements Callable<String> {
        @Override
        public String call() {
          return TEST_STRING;
        }
      }
    
      public Callable<String> latchAwaitingStringTask(final CountDownLatch latch) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 19:21:11 UTC 2024
    - 37.7K bytes
    - Viewed (0)
Back to top