Simplify is_pv condition checks after TT probe#6720
Conversation
No functional change
restore master
No functional change
No functional change
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughChanges to transposition table (TT) flag handling in the search engine's core functions. In Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
|
@FauziAkram please answer the questions raised by @dubslow above. Also rebase+squash the current PR on master... however keep the current PR open, no new PR... i.e. use a force push to this branch. |
|
Tbh, I'm not sure about dubslow's point. I was hoping that someone with more experience than me on this matter could help review. |
|
I find it quite unlikely to lose elo, but it is technically a functional change, possibly (and maybe not even that). I too was hoping someone else could confirm my commentary. Given the little interest from others, I suggest perhaps an STC-SMP nonreg fishtest. (That or a standard nonreg STC+LTC.) Such a blue test would be quite sufficient to merge imo. |
Simplify is_pv condition checks after TT probe
Currently, in both search() and qsearch(), the code checks ttHit && ttData.is_pv. However, the ttHit condition is redundant. When tt.probe() registers a miss (ttHit is false), it returns a newly initialized TTData struct where is_pv is already natively set to false. Therefore, evaluating ttData.is_pv alone is completely safe and functionally identical.
Additionally, this change allows us to eliminate the local pvHit variable entirely in qsearch(), passing ttData.is_pv directly to ttWriter.write().
No functional change