<story><title>Djbsort: A new software library for sorting arrays of integers</title><url>https://sorting.cr.yp.to/</url></story><parent_chain></parent_chain><comment><author>yoklov</author><text>The problem with AVX2 accelerated code (and much of AVX) is that unless you have a lot of it to run you end up with a substantial speed hit that comes from the cost of switching to a different power bin (which often takes 1 or 2ms!) and then running at a lower clock speed.&lt;p&gt;This often still ends up being an improvement over scalar code (at the cost of higher power usage), but for occasional workloads that don&amp;#x27;t need to do multiple milliseconds of AVX instructions you tend to have better results from 4-wide vectors, which don&amp;#x27;t have this cost.</text></comment>
<story><title>Djbsort: A new software library for sorting arrays of integers</title><url>https://sorting.cr.yp.to/</url></story><parent_chain></parent_chain><comment><author>lixtra</author><text>The main feature of the algorithm is to sort fast in constant time (for fixed n) for cryptographic purposes [0].&lt;p&gt;[0] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;ntruprime.cr.yp.to&amp;#x2F;ntruprime-20170816.pdf&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;ntruprime.cr.yp.to&amp;#x2F;ntruprime-20170816.pdf&lt;/a&gt; P. 48</text></comment>