From 5b9d51bc9c49a55779228b7f023fb34d770f7889 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Tue, 24 Sep 2024 11:59:37 -0400 Subject: [PATCH] perf: use `single` concurrency model for single-threaded tests --- src/iguana/tests/include/TestAlgorithm.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/iguana/tests/include/TestAlgorithm.h b/src/iguana/tests/include/TestAlgorithm.h index ef0446c1..43e4de02 100644 --- a/src/iguana/tests/include/TestAlgorithm.h +++ b/src/iguana/tests/include/TestAlgorithm.h @@ -2,6 +2,7 @@ #include #include +#include inline int TestAlgorithm( std::string command, @@ -23,6 +24,9 @@ inline int TestAlgorithm( return 1; } + // set the concurrency model to single-threaded, for optimal performance + iguana::GlobalConcurrencyModel = "single"; + // open the HIPO file; we use 2 readers, one for 'before' (i.e., not passed through iguana), and one for 'after' // (passed through iguana), so we may compare them hipo::reader reader_before(data_file.c_str()); // NOTE: not copy-constructable, so make two separate readers