Add change-counting benchmark#369
Conversation
|
The motivation behind the hitherto latest commit stems from an observation that the scaling of the parallelism becomes more visible when the number of denominations in the I had previously ran these benchmarks with coins input of size 1400 Looking at the results from running the multicore version, it seems like performance peaks as the number of cores and denominations are roughly equal to one another. |
Sudha247
left a comment
There was a problem hiding this comment.
Thanks! This is a great addition to the set of parallel bench.
Left some comments below. Switching from tuples to records would simplify the code IMO.
| | _ -> aux (L.tl c) (((amt, c, []))::stack) in | ||
| aux coins [] | ||
|
|
||
| let coins_input : (int * int) list = |
There was a problem hiding this comment.
The tuple here could be replaced with a record such as:
type coin = { denom : int; num : int; }
This would make it easier to read what's stored in the tuple.
This PR adds a combinatorial benchmark that enumerates the all the possible way to distribute change to pay a given amount. The relevant config files have also been updated.