charleskawczynski / PokerHandEvaluator.jl

A Poker hand evaluator, with Texas hold 'em in mind.
MIT License
6 stars 0 forks source link

Reduce allocations for 6 & 7-card hand evaluations #32

Closed charleskawczynski closed 3 years ago

charleskawczynski commented 3 years ago

This PR reduces allocations for 6 & 7-card hand evaluations by avoiding making a tuple of all card combinations, and instead evaluates and tracks each 5-card hand rank. We're also adding a test for the allocations

charleskawczynski commented 3 years ago

bors r+

codecov[bot] commented 3 years ago

Codecov Report

Merging #32 (223ac76) into main (e1289b8) will not change coverage. The diff coverage is 100.00%.

:exclamation: Current head 223ac76 differs from pull request most recent head d4affc3. Consider uploading reports for the commit d4affc3 to get more accurate results Impacted file tree graph

@@            Coverage Diff            @@
##              main       #32   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         4    +1     
  Lines          180       235   +55     
=========================================
+ Hits           180       235   +55     
Impacted Files Coverage Δ
src/PokerHandEvaluator.jl 100.00% <100.00%> (ø)
src/best_hand_rank_from_n_cards.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e1289b8...d4affc3. Read the comment docs.

bors[bot] commented 3 years ago

Build failed:

charleskawczynski commented 3 years ago

bors r+

charleskawczynski commented 3 years ago

bors r-

bors[bot] commented 3 years ago

Canceled.

charleskawczynski commented 3 years ago

bors r+

bors[bot] commented 3 years ago

Build succeeded: