Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't have the time to write it for you (not too sure your sample is actually complete enough to do so) but if you must, I can think of</p> <ul> <li><p>using translation tables for the various input/output bit shift offsets; This optimization would make sense for fixed units of <code>n</code> bits (with <code>n</code> sufficiently large (8 bits?) to expect performance gains) In essence, you'd be able to do</p> <pre><code>destloc &amp;= (lookuptable[bits_left_in_buffer][input_offset][codeword]); </code></pre></li> </ul> <p><em>disclaimer: this is very sloppy pseudo code, I just hope it conveys my idea of a lookup table o prevent bitshift arithmetics</em></p> <ul> <li>writing it in assembly (I know i386 has <a href="http://faydoc.tripod.com/cpu/xlat.htm" rel="nofollow"><code>XLAT</code></a>, but then again, a good compiler might already use something like that) ; Also, XLAT seems limited to 8 bits and the AL register, so it's not really versatile</li> </ul> <h2>Update</h2> <p><strong>Warning</strong>: be sure to use a profiler and test your optimization for correctness and speed. Using a lookup table <em>can</em> result in poorer performance in the light of locality of reference. So, you might need to change the bit-streaming thread on a single core (set thread affinity) to get the benefits, and you might have to adapt the lookup table size to the processor's L2 cache.</p> <p>Als, have a look at <a href="http://users.telenet.be/tfautre/softdev/simd/" rel="nofollow">SIMD</a>, <a href="http://en.wikipedia.org/wiki/SSE4" rel="nofollow">SSE4</a> or <a href="http://developer.nvidia.com/cuda-downloads" rel="nofollow">GPU (CUDA)</a> instruction sets if you <em>know</em> you'll have certain features at your disposal. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload