src/share/vm/utilities/hashtable.inline.hpp

changeset 3865
e9140bf80b4a
parent 2708
1d1603768966
child 3900
d2a62e0f25eb
     1.1 --- a/src/share/vm/utilities/hashtable.inline.hpp	Mon Jun 11 13:10:14 2012 -0400
     1.2 +++ b/src/share/vm/utilities/hashtable.inline.hpp	Wed Jun 13 19:52:59 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -30,27 +30,6 @@
    1.11  
    1.12  // Inline function definitions for hashtable.hpp.
    1.13  
    1.14 -
    1.15 -// --------------------------------------------------------------------------
    1.16 -// Hash function
    1.17 -
    1.18 -// We originally used hashpjw, but hash P(31) gives just as good results
    1.19 -// and is slighly faster. We would like a hash function that looks at every
    1.20 -// character, since package names have large common prefixes, and also because
    1.21 -// hash_or_fail does error checking while iterating.
    1.22 -
    1.23 -// hash P(31) from Kernighan & Ritchie
    1.24 -
    1.25 -inline unsigned int BasicHashtable::hash_symbol(const char* s, int len) {
    1.26 -  unsigned int h = 0;
    1.27 -  while (len-- > 0) {
    1.28 -    h = 31*h + (unsigned) *s;
    1.29 -    s++;
    1.30 -  }
    1.31 -  return h;
    1.32 -}
    1.33 -
    1.34 -
    1.35  // --------------------------------------------------------------------------
    1.36  
    1.37  // Initialize a table.

mercurial