mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 01:12:15 +03:00
code size reduction by using function arrays and add bandwidth to output
This commit is contained in:
committed by
Konstantinos Margaritis
parent
bb9bcb3760
commit
e0fefb3489
@@ -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<<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<<" bandwidth"<<(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<<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<<" bandwidth"<<(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<<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<<" bandwidth"<<(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<<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<<" bandwidth"<<(size/total_sec)<<std::endl;
|
||||
}
|
||||
delete [] kt1;
|
||||
}
|
||||
Reference in New Issue
Block a user