Home / Function/ hashCodeBenchCharSequenceOld() — netty Function Reference

hashCodeBenchCharSequenceOld() — netty Function Reference

Architecture documentation for the hashCodeBenchCharSequenceOld() function in AsciiStringBenchmark.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  3abd1b73_d937_ec50_e392_aafe8d89a97f["hashCodeBenchCharSequenceOld()"]
  aff6af82_71b2_329f_41cf_d30a3ab60974["AsciiStringBenchmark"]
  3abd1b73_d937_ec50_e392_aafe8d89a97f -->|defined in| aff6af82_71b2_329f_41cf_d30a3ab60974
  style 3abd1b73_d937_ec50_e392_aafe8d89a97f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

microbench/src/main/java/io/netty/microbenchmark/common/AsciiStringBenchmark.java lines 81–90

    @Benchmark
    public int hashCodeBenchCharSequenceOld() {
        int h = 0;
        for (int i = 0; i < string.length(); ++i) {
            // masking with 0x1F reduces the number of overall bits that impact the hash code but makes the hash
            // code the same regardless of character case (upper case or lower case hash is the same).
            h = h * 31 + (string.charAt(i) & 0x1F);
        }
        return h;
    }

Domain

Subdomains

Frequently Asked Questions

What does hashCodeBenchCharSequenceOld() do?
hashCodeBenchCharSequenceOld() is a function in the netty codebase, defined in microbench/src/main/java/io/netty/microbenchmark/common/AsciiStringBenchmark.java.
Where is hashCodeBenchCharSequenceOld() defined?
hashCodeBenchCharSequenceOld() is defined in microbench/src/main/java/io/netty/microbenchmark/common/AsciiStringBenchmark.java at line 81.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free