]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
nits
authorapostolos <apostolos.tapsas@vectorcamp.gr>
Wed, 25 Aug 2021 08:43:33 +0000 (11:43 +0300)
committerKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Tue, 12 Oct 2021 08:51:34 +0000 (11:51 +0300)
benchmarks/benchmarks.cpp
benchmarks/noodle.cpp
benchmarks/shufti.cpp
benchmarks/truffle.cpp

index d2c5fa8a0e1edb16a95a4a6240c51bbb95143b28..34f1ccfc9797285cc8f6a22fdc2511c5442704fd 100644 (file)
@@ -25,7 +25,7 @@ int main(){
             functions[j](sizes[i],iters[i],exp_len[i],true);  
         } 
     }
-
+    
     for(int i=0; i<12; i++){
         if(i==0){
             std::cout<<std::endl <<"\x1B[33m noodle Benchmarks(kbytes) \x1B[0m"<<std::endl;
index a710b43d7664d287e42fb70950ce6f232b81b45c..86222f80df0a2e2e0768210e7881844451004978 100644 (file)
@@ -47,6 +47,6 @@ void noodle_benchmarks(int size, int M, const char *lit_str, int lit_len, char n
         total_sec += noodExec_elapsed_seconds.count();
     }
     total_sec /= M;
-    std::cout<<"\x1B[35m Case with match in random pos and size: "<<size<<" lit_len: "<<lit_len<<" nocase: "<<(int)nocase<<"\x1B[36m noodExec elapsetime: \x1B[0m"<<total_sec<<" bandwidth"<<(size/total_sec)<<std::endl;    
+    std::cout<<"\x1B[35m Case with match in random pos and size: "<<size<<" lit_len: "<<lit_len<<" nocase: "<<(int)nocase<<"\x1B[36m noodExec elapsetime: \x1B[0m"<<total_sec<<"\x1B[36m bandwidth: \x1B[0m"<<(size/total_sec)<<std::endl;    
     delete [] data;
 }
\ No newline at end of file
index b20c4f9d3742eadc70f993414323441dce3f6837..d154068544f53785008d8b58671d1d56f43486e6 100644 (file)
@@ -36,7 +36,7 @@ void shufti_benchmarks(int size, int loops, int M, bool has_match) {
             total_sec += shuftiExec_elapsed_seconds.count();
         }
         total_sec /= M;
-        std::cout<<"\x1B[35m Case with match in random pos and size: "<<size<<" for "<<loops<<" loops ("<< M <<" random possisions checked):"<<"\x1B[36m shuftiExec elapsetime: \x1B[0m"<<total_sec<<" bandwidth"<<(size/total_sec)<<std::endl;
+        std::cout<<"\x1B[35m Case with match in random pos and size: "<<size<<" for "<<loops<<" loops ("<< M <<" random possisions checked):"<<"\x1B[36m shuftiExec elapsetime: \x1B[0m"<<total_sec<<"\x1B[36m bandwidth: \x1B[0m"<<(size/total_sec)<<std::endl;
     } else {
         auto start = std::chrono::steady_clock::now();
         for (int i = 0; i < loops; i++) {
@@ -45,7 +45,7 @@ void shufti_benchmarks(int size, int loops, int M, bool has_match) {
         auto end = std::chrono::steady_clock::now();
         std::chrono::duration<double> shuftiExec_elapsed_seconds = end-start;
         total_sec += shuftiExec_elapsed_seconds.count();
-        std::cout<<"\x1B[35m Case with no match in random pos and size: "<<size<<" for "<<loops<<" loops:"<<"\x1B[36m shuftiExec elapsetime: \x1B[0m"<<total_sec<<" bandwidth"<<(size/total_sec)<<std::endl;
+        std::cout<<"\x1B[35m Case with no match in random pos and size: "<<size<<" for "<<loops<<" loops:"<<"\x1B[36m shuftiExec elapsetime: \x1B[0m"<<total_sec<<"\x1B[36m bandwidth: \x1B[0m"<<(size/total_sec)<<std::endl;
     }
     delete [] kt1;
 }
@@ -71,7 +71,7 @@ void rshufti_benchmarks(int size, int loops, int M, bool has_match) {
             total_sec += shuftiExec_elapsed_seconds.count();
         }
         total_sec /= M;
-        std::cout<<"\x1B[35m Case with match in random pos and size: "<<size<<" for "<<loops<<" loops ("<< M <<" random possisions checked):"<<"\x1B[36m rshuftiExec elapsetime: \x1B[0m"<<total_sec<<" bandwidth"<<(size/total_sec)<<std::endl;
+        std::cout<<"\x1B[35m Case with match in random pos and size: "<<size<<" for "<<loops<<" loops ("<< M <<" random possisions checked):"<<"\x1B[36m rshuftiExec elapsetime: \x1B[0m"<<total_sec<<"\x1B[36m bandwidth: \x1B[0m"<<(size/total_sec)<<std::endl;
     } else {
         auto start = std::chrono::steady_clock::now();
         for (int i = 0; i < loops; i++) {
@@ -80,7 +80,7 @@ void rshufti_benchmarks(int size, int loops, int M, bool has_match) {
         auto end = std::chrono::steady_clock::now();
         std::chrono::duration<double> shuftiExec_elapsed_seconds = end-start;
         total_sec += shuftiExec_elapsed_seconds.count();
-        std::cout<<"\x1B[35m Case with no match in random pos and size: "<<size<<" for "<<loops<<" loops:"<<"\x1B[36m rshuftiExec elapsetime: \x1B[0m"<<total_sec<<" bandwidth"<<(size/total_sec)<<std::endl;
+        std::cout<<"\x1B[35m Case with no match in random pos and size: "<<size<<" for "<<loops<<" loops:"<<"\x1B[36m rshuftiExec elapsetime: \x1B[0m"<<total_sec<<"\x1B[36m bandwidth: \x1B[0m"<<(size/total_sec)<<std::endl;
     }
     delete [] kt1;
 }
index f20dcb864ab3a45e80fdd46d2d9dd41f7de603e0..44f393c93b5e5e7b1c0e50befb4da0be44381f79 100644 (file)
@@ -36,7 +36,7 @@ void truffle_benchmarks(int size, int loops, int M, bool has_match) {
             total_sec += shuftiExec_elapsed_seconds.count();
         }
         total_sec /= M;
-        std::cout<<"\x1B[35m Case with match in random pos and size: "<<size<<" for "<<loops<<" loops ("<< M <<" random possisions checked):"<<"\x1B[36m truffleExec elapsetime: \x1B[0m"<<total_sec<<" bandwidth"<<(size/total_sec)<<std::endl;
+        std::cout<<"\x1B[35m Case with match in random pos and size: "<<size<<" for "<<loops<<" loops ("<< M <<" random possisions checked):"<<"\x1B[36m truffleExec elapsetime: \x1B[0m"<<total_sec<<"\x1B[36m bandwidth: \x1B[0m"<<(size/total_sec)<<std::endl;
     } else {
         auto start = std::chrono::steady_clock::now();
         for (int i = 0; i < loops; i++) {
@@ -45,7 +45,7 @@ void truffle_benchmarks(int size, int loops, int M, bool has_match) {
         auto end = std::chrono::steady_clock::now();
         std::chrono::duration<double> shuftiExec_elapsed_seconds = end-start;
         total_sec += shuftiExec_elapsed_seconds.count();
-        std::cout<<"\x1B[35m Case with no match in random pos and size: "<<size<<" for "<<loops<<" loops:"<<"\x1B[36m truffleExec elapsetime: \x1B[0m"<<total_sec<<" bandwidth"<<(size/total_sec)<<std::endl;
+        std::cout<<"\x1B[35m Case with no match in random pos and size: "<<size<<" for "<<loops<<" loops:"<<"\x1B[36m truffleExec elapsetime: \x1B[0m"<<total_sec<<"\x1B[36m bandwidth: \x1B[0m"<<(size/total_sec)<<std::endl;
     }
     delete [] kt1;
 }
@@ -72,7 +72,7 @@ void rtruffle_benchmarks(int size, int loops, int M, bool has_match) {
             total_sec += shuftiExec_elapsed_seconds.count();
         }
         total_sec /= M;
-        std::cout<<"\x1B[35m Case with match in random pos and size: "<<size<<" for "<<loops<<" loops ("<< M <<" random possisions checked):"<<"\x1B[36m rtruffleExec elapsetime: \x1B[0m"<<total_sec<<" bandwidth"<<(size/total_sec)<<std::endl;
+        std::cout<<"\x1B[35m Case with match in random pos and size: "<<size<<" for "<<loops<<" loops ("<< M <<" random possisions checked):"<<"\x1B[36m rtruffleExec elapsetime: \x1B[0m"<<total_sec<<"\x1B[36m bandwidth: \x1B[0m"<<(size/total_sec)<<std::endl;
     } else {
         auto start = std::chrono::steady_clock::now();
         for (int i = 0; i < loops; i++) {
@@ -81,7 +81,7 @@ void rtruffle_benchmarks(int size, int loops, int M, bool has_match) {
         auto end = std::chrono::steady_clock::now();
         std::chrono::duration<double> shuftiExec_elapsed_seconds = end-start;
         total_sec += shuftiExec_elapsed_seconds.count();
-        std::cout<<"\x1B[35m Case with no match in random pos and size: "<<size<<" for "<<loops<<" loops:"<<"\x1B[36m rtruffleExec elapsetime: \x1B[0m"<<total_sec<<" bandwidth"<<(size/total_sec)<<std::endl;
+        std::cout<<"\x1B[35m Case with no match in random pos and size: "<<size<<" for "<<loops<<" loops:"<<"\x1B[36m rtruffleExec elapsetime: \x1B[0m"<<total_sec<<"\x1B[36m bandwidth: \x1B[0m"<<(size/total_sec)<<std::endl;
     }
     delete [] kt1;
 }
\ No newline at end of file