+ // Avoid to do an expensive singular extension search on nodes where
+ // such search have already been done in the past, so assume the last
+ // singular extension search result is still valid.
+ if ( !PvNode
+ && depth < SingularExtensionDepth[PvNode] + 5 * OnePly
+ && ((ttx = TT.retrieve(pos.get_exclusion_key())) != NULL))
+ {
+ if (is_upper_bound(ttx->type()))
+ ext = OnePly;
+
+ singularExtensionNode = false;
+ }
+