Skip to content

Commit

Permalink
test: make int64_t casts explicit in msb tests
Browse files Browse the repository at this point in the history
  • Loading branch information
div72 committed Mar 5, 2024
1 parent 08f65b8 commit 0e8552d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/util_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1173,23 +1173,23 @@ BOOST_AUTO_TEST_CASE(Fraction_msb_performance_test)
g_timer.InitTimer("msb_test", true);

for (unsigned int i = 0; i < iterations; ++i) {
msb(rand.rand64());
msb((int64_t)rand.rand64());
}

int64_t msb_test_time = g_timer.GetTimes(strprintf("msb %u iterations", iterations), "msb_test").time_since_last_check;

FastRandomContext rand2(uint256 {0});

for (unsigned int i = 0; i < iterations; ++i) {
msb2(rand2.rand64());
msb2((int64_t)rand2.rand64());
}

int64_t msb2_test_time = g_timer.GetTimes(strprintf("msb2 %u iterations", iterations), "msb_test").time_since_last_check;

FastRandomContext rand3(uint256 {0});

for (unsigned int i = 0; i < iterations; ++i) {
msb3(rand3.rand64());
msb3((int64_t)rand3.rand64());
}

int64_t msb3_test_time = g_timer.GetTimes(strprintf("msb3 %u iterations", iterations), "msb_test").time_since_last_check;
Expand Down

0 comments on commit 0e8552d

Please sign in to comment.