Commit fbf36fc
Performance: hoist String fast-path above null check in hashCodeIgnoreCase(CharSequence)
The original ordering tested `cs == null` first, then checked `cs instanceof String`
to delegate to the optimized String-specific overload. Since `null instanceof String`
is false, the null branch is never taken on the String path and adds a wasted
comparison on what is by far the most common input type. Reordering so the
String-dispatch runs first preserves null-safety (null instanceof String == false
leaves the null check in place for non-String inputs) and removes one branch on
the hot path. Pure reordering, no behavioral change.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent b45c0b8 commit fbf36fc
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
990 | 990 | | |
991 | 991 | | |
992 | 992 | | |
993 | | - | |
994 | | - | |
995 | 993 | | |
996 | 994 | | |
997 | 995 | | |
998 | 996 | | |
999 | 997 | | |
| 998 | + | |
| 999 | + | |
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
| |||
0 commit comments