centralized performance resources
This commit is contained in:
commit
50b15a1522
63 changed files with 328466 additions and 0 deletions
39
perf-cpp/scripts/switch.cc
Normal file
39
perf-cpp/scripts/switch.cc
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#include <iostream>
|
||||
|
||||
extern volatile int sink;
|
||||
|
||||
int g(int x) {
|
||||
if (x == 100) sink = 42;
|
||||
else if (x == 101) sink = 7;
|
||||
else if (x == 102) sink = 99;
|
||||
else if (x == 103) sink = 13;
|
||||
else if (x == 104) sink = 5;
|
||||
else if (x == 105) sink = 88;
|
||||
else if (x == 106) sink = 21;
|
||||
else if (x == 107) sink = 60;
|
||||
else if (x == 108) sink = 33;
|
||||
else if (x == 109) sink = 1;
|
||||
else if (x == 110) sink = 77;
|
||||
else if (x == 111) sink = 12;
|
||||
else if (x == 112) sink = 54;
|
||||
else if (x == 113) sink = 31;
|
||||
else if (x == 114) sink = 73;
|
||||
else if (x == 115) sink = 16;
|
||||
else sink = -1;
|
||||
return sink;
|
||||
}
|
||||
|
||||
int main() {
|
||||
char x;
|
||||
std::cin >> x;
|
||||
|
||||
if (x == 'x') {
|
||||
std::cout << "hi\n";
|
||||
} else {
|
||||
if (x == 'y') {
|
||||
std::cout << "sup\n";
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue