ACD66 performance improvements by avoiding unnecessary computation

This commit is contained in:
aletempiac 2024-02-29 17:15:29 +01:00
parent 75abcd376b
commit 48b5f3b399
1 changed files with 6 additions and 2 deletions

View File

@ -160,8 +160,10 @@ private:
best_multiplicity = UINT32_MAX;
best_free_set = UINT32_MAX;
uint32_t max_free_set = num_vars == 11 ? 5 : 4;
/* find ACD "66" for different number of variables in the free set */
for ( uint32_t i = num_vars - 6; i <= 5; ++i )
for ( uint32_t i = num_vars - 6; i <= max_free_set; ++i )
{
if ( find_decomposition_bs( i ) )
return true;
@ -176,8 +178,10 @@ private:
best_multiplicity = UINT32_MAX;
best_free_set = UINT32_MAX;
uint32_t max_free_set = ( num_vars == 11 || offset == 5 ) ? 5 : 4;
/* find ACD "66" for different number of variables in the free set */
for ( uint32_t i = std::max( num_vars - 6, offset ); i <= 5; ++i )
for ( uint32_t i = std::max( num_vars - 6, offset ); i <= max_free_set; ++i )
{
if ( find_decomposition_bs_offset( i, offset ) )
return true;