test/detail_tests/test_factorize_wheel210.cpp
// A comparative performance test - we shouldn't normally run this.
// 6/7/20 haswell results: for uint32_t, template version ran about 2.5x slower.
//            changing both to uint64_t, template version ran about 5.5x slower.
//            (These results were roughly as expected)
A comparative performance test - we shouldn't normally run this.
6/7/20 haswell results: for uint32_t, template version ran about 2.5x slower.
changing both to uint64_t, template version ran about 5.5x slower.
(These results were roughly as expected)
A comparative performance test - we shouldn ' t normally run this . 6 / 7 / 20 haswell results : for uint32_t template version ran about 2 . 5x slower . changing both to uint64_t template version ran about 5 . 5x slower . ( These results were roughly as expected )
TEST(HurchallaFactoringIsPrime, perf_uint32_small_trial_div) {
        using T = std::uint32_t;
        T max = ut_numeric_limits<T>::max();
        T dummy = 0;
        constexpr int factors_len = ut_numeric_limits<T>::digits;
        T factors[factors_len];
        for (T x = max - 65336*32; x < max; ++x) {
            T y = x;
            dummy += (T)small_trial_division(factors, factors_len, y);
        }
        EXPECT_TRUE(dummy != 0);
    }
TEST ( HurchallaFactoringIsPrime , perf_uint32_small_trial_div ) { using T = std :: uint32_t ; T max = ut_numeric_limits < T > :: max ( ) ; T dummy = 0 ; constexpr int factors_len = ut_numeric_limits < T > :: digits ; T factors [ factors_len ] ; for ( T x = max - 65336 * 32 ; x < max ; ++ x ) { T y = x ; dummy += ( T ) small_trial_division ( factors , factors_len , y ) ; } EXPECT_TRUE ( dummy != 0 ) ; }
A comparative performance test - we shouldn't normally run this.
A comparative performance test - we shouldn ' t normally run this .