title: Fastest (Optimized) way to swap bytes of a 32 bit value
body: <p>I need to swap bytes of a 32 bit value 11223344 should be swapped as 44332211.
  Currently i'm using following logic.</p>
  
  <pre><code>val = ((((val) &amp; 0xff000000) &gt;&gt; 24)|
        (((val) &amp; 0x00ff0000) &gt;&gt;  8) |
        (((val) &amp; 0x0000ff00) &lt;&lt;  8) |
        (((val) &amp; 0x000000ff) &lt;&lt; 24));
  </code></pre>
  
  <p>This is working as expected. But i just wanted to know is there any other fastest/Optimized way to do the same.</p>