Home / Class/ MathOperationsBenchmark Class — netty Architecture

MathOperationsBenchmark Class — netty Architecture

Architecture documentation for the MathOperationsBenchmark class in MathOperationsBenchmark.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  400df187_c74d_daf1_bd5c_28207b3cfbaf["MathOperationsBenchmark"]
  4f2a7449_a9bb_a8b2_29c7_ddf8cb6ffa38["MathOperationsBenchmark.java"]
  400df187_c74d_daf1_bd5c_28207b3cfbaf -->|defined in| 4f2a7449_a9bb_a8b2_29c7_ddf8cb6ffa38
  1cdecbd2_6302_3d73_01fe_7f5cbf0a882d["nextIndexNoConditionals()"]
  400df187_c74d_daf1_bd5c_28207b3cfbaf -->|method| 1cdecbd2_6302_3d73_01fe_7f5cbf0a882d
  74b8d518_2cea_9371_8fec_be3be501bf93["nextIndexConditionals()"]
  400df187_c74d_daf1_bd5c_28207b3cfbaf -->|method| 74b8d518_2cea_9371_8fec_be3be501bf93

Relationship Graph

Source Code

microbench/src/main/java/io/netty/microbenchmark/common/MathOperationsBenchmark.java lines 20–34

public class MathOperationsBenchmark extends AbstractMicrobenchmark {
    private int index;
    private final int length = 1 << 20;
    private final int mask = length - 1;

    @Benchmark
    public int nextIndexNoConditionals() {
        return (index + 1) & mask;
    }

    @Benchmark
    public int nextIndexConditionals() {
        return index == length - 1 ? 0 : index + 1;
    }
}

Frequently Asked Questions

What is the MathOperationsBenchmark class?
MathOperationsBenchmark is a class in the netty codebase, defined in microbench/src/main/java/io/netty/microbenchmark/common/MathOperationsBenchmark.java.
Where is MathOperationsBenchmark defined?
MathOperationsBenchmark is defined in microbench/src/main/java/io/netty/microbenchmark/common/MathOperationsBenchmark.java at line 20.

Analyze Your Own Codebase

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

Try Supermodel Free