<title>Compile and Run Benchmarks</title><para>To build the benchmark code, enable the CMake option <computeroutput>TF_BUILD_BENCHMARKS</computeroutput> to <computeroutput>ON</computeroutput> as follows:</para>
<para>After you successfully build the benchmark code, you can find all benchmark instances in the <computeroutput>benchmarks/</computeroutput> folder. You can run the executable of each instance in the corresponding folder.</para>
<para>We currently implement the following instances that are commonly used by the parallel computing community to evaluate the system performance.</para>
</entry><entrythead="no"align='center'><para>configure the baseline models to run, tbb, omp, or tf </para>
</entry></row>
</table>
</para>
<para>You can configure the benchmarking environment by giving different options.</para>
<sect2id="BenchmarkTaskflow_1SpecifyTheRunModel">
<title>Specify the Run Model</title><para>In addition to a Taskflow-based implementation for each benchmark instance, we have implemented two baseline models using the state-of-the-art parallel programming libraries, <ulinkurl="https://www.openmp.org/">OpenMP</ulink> and <ulinkurl="https://github.com/oneapi-src/oneTBB">Intel TBB</ulink>, to measure and evaluate the performance of Taskflow. You can select different implementations by passing the option <computeroutput>-m</computeroutput>.</para>
<title>Specify the Number of Threads</title><para>You can configure the number of threads to run a benchmark instance by passing the option <computeroutput>-t</computeroutput>. The default value is one.</para>
<para>Depending on your environment, you may need to use <computeroutput>taskset</computeroutput> to set the CPU affinity of the running process. This allows the OS scheduler to keep process on the same CPU(s) as long as practical for performance reason.</para>
<title>Specify the Number of Rounds</title><para>Each benchmark instance evaluates the runtime of the implementation at different problem sizes. Each problem size corresponds to one iteration. You can configure the number of rounds per iteration to average the runtime.</para>