Poker equity calculation algorithm
Since you're doing an O(N³) operation, with a linear search, a big performance boost will happen if we can eliminate that search.

There are two similar ways to go about it; both replace the search with an indexed lookup.


Change the type of board from a vector that holds the cards to a vector (or array) of card_count slots that holds a count of how many of that card is in the board (using a count for future expansion to multiple decks).
In GetEquity, fill a vector or array of card_count elements with counts for the cards in board, then just check that container for a nonzero to see if the card is contained in the board.  This has the additional advantage of being able to add c1 and c2, so the inner loop checks only need to check one condition (rather than 2 or 3) to see if a card is available.


Here's an updated GetEquity using ideas from option 2:

float GetEquity(const std::vector&lt;int&gt;&amp; board)
{
    std::vector&lt;int&gt; counts(card_count);
    for (auto b: board)
        ++counts[b];

    float equity = 0;

    for (int c1 = 0; c1 &lt; card_count; c1++) // Player1 card
    {
        if (counts[c1])
        {
            continue;
        }
        ++counts[c1];

        for (int c2 = 0; c2 &lt; card_count; c2++)  // Player2 card 
        {
            if (counts[c2])
            {
                continue;
            }
            ++counts[c2];

            size_t usedBoards = 0; // number of boards are possible for this players and board cards
            float currentEquity = 0;

            for (int b = 0; b &lt; card_count; b++) // Iterating river board cards
            {
                if (counts[b])
                {
                    continue;
                }

                size_t p1stren = GetHandStrength(board, c1, b);
                size_t p2stren = GetHandStrength(board, c2, b);

                if (p1stren &gt; p2stren)
                {
                    currentEquity += 1.0;
                }
                else if (p1stren &lt; p2stren)
                {
                    currentEquity -= 1.0;
                }

                usedBoards++;
            }

            currentEquity /= usedBoards;
            equity += currentEquity;

            --counts[c2];
        }
        --counts[c1];
    }

    return equity;
}