This commit is contained in:
apostolos 2021-08-25 11:43:33 +03:00 committed by Konstantinos Margaritis
parent 1009391d9f
commit 4027319d6c
4 changed files with 10 additions and 10 deletions

View File

@ -25,7 +25,7 @@ int main(){
functions[j](sizes[i],iters[i],exp_len[i],true); functions[j](sizes[i],iters[i],exp_len[i],true);
} }
} }
for(int i=0; i<12; i++){ for(int i=0; i<12; i++){
if(i==0){ if(i==0){
std::cout<<std::endl <<"\x1B[33m noodle Benchmarks(kbytes) \x1B[0m"<<std::endl; std::cout<<std::endl <<"\x1B[33m noodle Benchmarks(kbytes) \x1B[0m"<<std::endl;

View 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 += noodExec_elapsed_seconds.count();
} }
total_sec /= M; 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; delete [] data;
} }

View 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 += shuftiExec_elapsed_seconds.count();
} }
total_sec /= M; 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 { } else {
auto start = std::chrono::steady_clock::now(); auto start = std::chrono::steady_clock::now();
for (int i = 0; i < loops; i++) { 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(); auto end = std::chrono::steady_clock::now();
std::chrono::duration<double> shuftiExec_elapsed_seconds = end-start; std::chrono::duration<double> shuftiExec_elapsed_seconds = end-start;
total_sec += shuftiExec_elapsed_seconds.count(); 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; 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 += shuftiExec_elapsed_seconds.count();
} }
total_sec /= M; 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 { } else {
auto start = std::chrono::steady_clock::now(); auto start = std::chrono::steady_clock::now();
for (int i = 0; i < loops; i++) { 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(); auto end = std::chrono::steady_clock::now();
std::chrono::duration<double> shuftiExec_elapsed_seconds = end-start; std::chrono::duration<double> shuftiExec_elapsed_seconds = end-start;
total_sec += shuftiExec_elapsed_seconds.count(); 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; delete [] kt1;
} }

View 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 += shuftiExec_elapsed_seconds.count();
} }
total_sec /= M; 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 { } else {
auto start = std::chrono::steady_clock::now(); auto start = std::chrono::steady_clock::now();
for (int i = 0; i < loops; i++) { 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(); auto end = std::chrono::steady_clock::now();
std::chrono::duration<double> shuftiExec_elapsed_seconds = end-start; std::chrono::duration<double> shuftiExec_elapsed_seconds = end-start;
total_sec += shuftiExec_elapsed_seconds.count(); 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; 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 += shuftiExec_elapsed_seconds.count();
} }
total_sec /= M; 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 { } else {
auto start = std::chrono::steady_clock::now(); auto start = std::chrono::steady_clock::now();
for (int i = 0; i < loops; i++) { 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(); auto end = std::chrono::steady_clock::now();
std::chrono::duration<double> shuftiExec_elapsed_seconds = end-start; std::chrono::duration<double> shuftiExec_elapsed_seconds = end-start;
total_sec += shuftiExec_elapsed_seconds.count(); 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; delete [] kt1;
} }