Added asmjit_test_perf, which replaces asmjit_bench and provides much better performance overview

Removed asmjit_test_opcode (not needed anymore as we have asmjit_test_assembler and asmjit_test_perf)
This commit is contained in:
kobalicek
2021-03-13 22:25:43 +01:00
parent c9cebc67bc
commit 7836449c30
13 changed files with 5419 additions and 6438 deletions

View File

@@ -32,6 +32,8 @@
#include <chrono>
#include "cmdline.h"
#include "performancetimer.h"
#include "asmjit_test_compiler.h"
#if defined(ASMJIT_BUILD_X86) && ASMJIT_ARCH_X86
@@ -54,27 +56,6 @@ void compiler_add_a64_tests(TestApp& app);
using namespace asmjit;
class PerformanceTimer {
public:
typedef std::chrono::high_resolution_clock::time_point TimePoint;
TimePoint _startTime {};
TimePoint _endTime {};
inline void start() {
_startTime = std::chrono::high_resolution_clock::now();
}
inline void stop() {
_endTime = std::chrono::high_resolution_clock::now();
}
inline double duration() const {
std::chrono::duration<double> elapsed = _endTime - _startTime;
return elapsed.count() * 1000;
}
};
// ============================================================================
// [TestApp]
// ============================================================================