
<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">Boost.Compute</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">Parallel CPU</td>
<td align="left"><strong>Yes</strong> <sup>1</sup></td>
<td align="left"><strong>Yes</strong> <sup>1</sup></td>
<td align="left"><strong>Yes</strong><sup>1,3</sup></td>
<td align="left"><strong>Yes</strong><sup>1,2,3</sup></td>
</tr>
</tbody>
</table>
<!-- | Empty     |  CUDA   | OpenCL  | CPU (Parallel) | -->
<!-- |-----------|---------|---------|--------| -->
<!-- | ArrayFire | **Yes** | **Yes** | **Yes** <sup>1</sup> | -->
<!-- | Boost.Compute| **No** | **Yes** | **Yes** <sup>1</sup> | -->
<!-- | HSA-Bolt  |  **No** | **Yes** | **Yes** <sup>1,3</sup> | -->
<!-- | Thrust    | **Yes** | **No**  | **Yes** <sup>1,2,3</sup> | -->
<ul>
<li><sup>1: Using OpenCL</sup></li>
<li><sup>2: Using OpenMP</sup></li>
<li><sup>3: Using TBB</sup></li>
</ul>
<h4 id="benchmarks">Benchmarks</h4>
