
<p>We have had several people ask us how ArrayFire compares to other Open Source vector libraries. We always give them the same answer:</p>
<blockquote>
<p>We are as fast or faster than the other libraries out in the open.</p>
</blockquote>
<p>In this post, we will expand on that answer and compare the performance of ArrayFire to thrust, BoostCompute and HSA-Bolt.</p>
<h3 id="background">Background</h3>
<h3 id="feature-comparison">Feature Comparison</h3>
<table>
<thead>
<tr class="header">
<th align="left">Empty</th>
<th align="left">ArrayFire</th>
<th align="left">BoostCompute</th>
<th align="left">HSA-Bolt</th>
<th align="left">Thrust</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">CUDA</td>
<td align="left"><strong>Yes</strong></td>
<td align="left">No</td>
<td align="left">No</td>
<td align="left"><strong>Yes</strong></td>
</tr>
<tr class="even">
<td align="left">OpenCL</td>
<td align="left"><strong>Yes</strong></td>
<td align="left"><strong>Yes</strong></td>
<td align="left"><strong>Yes</strong></td>
<td align="left">No</td>
</tr>
<tr class="odd">
<td align="left">CPU Fallback</td>
<td align="left"><strong>Yes</strong> <sup>1,2</sup></td>
<td align="left"><strong>Yes</strong> <sup>2</sup></td>
<td align="left"><strong>Yes</strong><sup>1,2</sup></td>
<td align="left"><strong>Yes</strong><sup>1,3,4</sup></td>
</tr>
</tbody>
</table>
<p><sup>1: Serial CPU</sup> <sup>2: Parallel CPU support using OpenCL</sup> <sup>3: Parallel CPU support using OpenMP</sup> <sup>4: Parallel CPU support using TBB</sup></p>
<h4 id="benchmarks">Benchmarks</h4>