add benchmark to app. TODO: test benchmark.

This commit is contained in:
TXuian 2022-12-07 16:57:43 +08:00
parent 93e42ded0d
commit 7446dd20b1
2 changed files with 8 additions and 7 deletions

View File

@ -31,8 +31,9 @@
#define ARRAY_SIZE(ar) (int) (sizeof(ar) / sizeof((ar)[0])) #define ARRAY_SIZE(ar) (int) (sizeof(ar) / sizeof((ar)[0]))
#define FAIL_IF(condition, error_code) if (condition) return (error_code) #define FAIL_IF(condition, error_code) if (condition) return (error_code)
#define SLRE_DEBUG
#ifdef SLRE_DEBUG #ifdef SLRE_DEBUG
#define DBG(x) printf x #define DBG(x) printf x;
#else #else
#define DBG(x) #define DBG(x)
#endif #endif

View File

@ -40,9 +40,9 @@ BenchmarkPair bmh_list[] = {
{.handle = &crc32_handle, .name = "crc32", .time = 0}, // {.handle = &crc32_handle, .name = "crc32", .time = 0}, //
{.handle = &md5_handle, .name = "md5sum", .time = 0}, // {.handle = &md5_handle, .name = "md5sum", .time = 0}, //
{.handle = &cubic_handle, .name = "cubic", .time = 0}, // {.handle = &cubic_handle, .name = "cubic", .time = 0}, //
{.handle = &edn_handle, .name = "edn", .time = 0}, // - {.handle = &edn_handle, .name = "edn", .time = 0}, //
// {.handle = &huffbench_handle, .name = "huffbench", .time = 0}, // // {.handle = &huffbench_handle, .name = "huffbench", .time = 0}, //
{.handle = &matmult_int_handle, .name = "matmult-int", .time = 0}, // - {.handle = &matmult_int_handle, .name = "matmult-int", .time = 0}, //
{.handle = &libminver_handle, .name = "libminver", .time = 0}, // {.handle = &libminver_handle, .name = "libminver", .time = 0}, //
{.handle = &nobody_handle, .name = "nbody", .time = 0}, // {.handle = &nobody_handle, .name = "nbody", .time = 0}, //
{.handle = &nettle_aes_handle, .name = "nettle-aes", .time = 0}, // {.handle = &nettle_aes_handle, .name = "nettle-aes", .time = 0}, //
@ -50,11 +50,11 @@ BenchmarkPair bmh_list[] = {
{.handle = &libnsichneu_handle, .name = "libnsichneu", .time = 0}, // {.handle = &libnsichneu_handle, .name = "libnsichneu", .time = 0}, //
{.handle = &picojpeg_handle, .name = "picojpeg", .time = 0}, // {.handle = &picojpeg_handle, .name = "picojpeg", .time = 0}, //
{.handle = &primecount_handle, .name = "primecount", .time = 0}, // {.handle = &primecount_handle, .name = "primecount", .time = 0}, //
{.handle = &qrtest_handle, .name = "qrtest", .time = 0}, // - {.handle = &qrtest_handle, .name = "qrtest", .time = 0}, //
{.handle = &combined_handle, .name = "combined", .time = 0}, // - {.handle = &combined_handle, .name = "combined", .time = 0}, //
{.handle = &slre_handle, .name = "slre", .time = 0}, // {.handle = &slre_handle, .name = "slre", .time = 0}, //
{.handle = &libst_handle, .name = "libst", .time = 0}, // - {.handle = &libst_handle, .name = "libst", .time = 0}, //
{.handle = &statemate_handle, .name = "statemate", .time = 0}, // - {.handle = &statemate_handle, .name = "statemate", .time = 0}, //
{.handle = &tarfind_handle, .name = "tarfind", .time = 0}, // {.handle = &tarfind_handle, .name = "tarfind", .time = 0}, //
{.handle = &libud_handle, .name = "libud", .time = 0}, // {.handle = &libud_handle, .name = "libud", .time = 0}, //
// {.handle = &libwikisort_handle, .name = "libwikisort", .time = 0}, // // {.handle = &libwikisort_handle, .name = "libwikisort", .time = 0}, //