<div dir="ltr">Hi,<br>for large integers (&gt; 64 bits), a bitClear: implementation using bitXor: is faster than by using - indeed we don&#39;t have to care of carry.<br><br>{<br>[(12398767868759866578644 bitOr: 567812564128976768553) - 567812564128976768553] bench.<br>[(12398767868759866578644 bitOr: 567812564128976768553) bitXor: 567812564128976768553] bench.<br>}<br>#(&#39;3,480,000 per second. 288 nanoseconds per run.&#39;<br> &#39;4,950,000 per second. 202 nanoseconds per run.&#39;)<br><div><br></div><div>For large integers &lt; 64 bits or small integers, I would expect sort of similar speed, but bitXor: is slower:<br><br></div><div>{<br>[(1234 bitOr: 5678) - 5678] bench.<br>[(1234 bitOr: 5678) bitXor: 5678] bench.<br>}<br><br>#(&#39;170,000,000 per second. 5.88 nanoseconds per run.&#39;<br>  &#39;133,000,000 per second. 7.53 nanoseconds per run.&#39;)<br><br>{<br>[(12398767868754 bitOr: 5678125641253) - 5678125641253] bench.<br>[(12398767868754 bitOr: 5678125641253) bitXor: 5678125641253] bench.<br>}<br>#(&#39;7,100,000 per second. 141 nanoseconds per run.&#39;<br>&#39;5,110,000 per second. 196 nanoseconds per run.&#39;)<br><br></div><div>OK, (Smalltalk specialSelectors includes: #bitXor:) is false, but is it the sole explanation?<br></div><div><br></div></div>