Java equals primitive vs object speed
问题 Just tried to test speed of equals when using Objects.equals vs Primitive comparison. If somebody needs the code: import org.junit.Test; import org.openjdk.jmh.annotations.*; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; import org.openjdk.jmh.runner.options.TimeValue; import java.util.Objects; import java.util.concurrent.TimeUnit; class BaseEquals { byte