mirror of
https://codeberg.org/wownero/RandomWOW
synced 2026-03-05 22:27:33 -05:00
Updated documentation
This commit is contained in:
@@ -26,7 +26,8 @@ const uint8_t seed[32] = { 191, 182, 222, 175, 249, 89, 134, 104, 241, 68, 191,
|
||||
|
||||
int main() {
|
||||
|
||||
constexpr int count = 100000;
|
||||
constexpr int count = 1000000;
|
||||
int isnCounts[randomx::SuperscalarInstructionType::COUNT] = { 0 };
|
||||
int64_t asicLatency = 0;
|
||||
int64_t codesize = 0;
|
||||
int64_t cpuLatency = 0;
|
||||
@@ -44,6 +45,10 @@ int main() {
|
||||
mulCount += prog.mulCount;
|
||||
size += prog.getSize();
|
||||
|
||||
for (unsigned j = 0; j < prog.getSize(); ++j) {
|
||||
isnCounts[prog(j).opcode]++;
|
||||
}
|
||||
|
||||
if ((i + 1) % (count / 100) == 0) {
|
||||
std::cout << "Completed " << ((i + 1) / (count / 100)) << "% ..." << std::endl;
|
||||
}
|
||||
@@ -57,5 +62,10 @@ int main() {
|
||||
std::cout << "Avg. mul. count: " << (mulCount / (double)count) << std::endl;
|
||||
std::cout << "Avg. RandomX ops: " << (size / (double)count) << std::endl;
|
||||
|
||||
std::cout << "Frequencies: " << std::endl;
|
||||
for (unsigned j = 0; j < randomx::SuperscalarInstructionType::COUNT; ++j) {
|
||||
std::cout << j << " " << isnCounts[j] << " " << isnCounts[j] / (double)size << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user