google / google/auto

Remove `o == this` check from generated `equals`?

Open
#1,633 2 comments 0 reactions 0 assignees View on GitHub
Component: value P3
Dominant language
Java
Stars
10.6k
Forks
1.2k
Avg merge
6h 32m
Merged PRs (30d)
13

Description

It appears that most cases `o == this` check actually degrades performance because of branch prediction algorithms. It might be worth considering to remove it from auto-value templates. Sorry for linking to YT, but there's no article anywhere - at least I couldn't find any.

Please see https://www.youtube.com/watch?v=kuzjX_efuDs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.