|
|
|
|
|
by simplicitea
1140 days ago
|
|
This seems like such a pointless semantic flex to me... In this case has the game not become Game A + Game B ? It's just a larger game with a distinct winning strategy because the ruleset is expanded right? What's the significance? |
|
Start with: 1 large fixed size data structure and 1 cache Algorithm A: Checks as it is iterating whether the cache is full. If not, it generates the cache data (SLOW) but can then iterate over the entire data structure quickly. First time it does this is a loss, but 2nd pass through the data structure leads to an overall win. Algorithm B: Prefers an empty cache. If cache is full it will delete it. It can iterate over the entire data structure fairly quickly. Each time is considered a win.
Now you have a program with many different features and everyone knows that it doesn't really matter if you use Algorithm A or B because they are both programmed to work safely together and if you test a feature using one of the algorithms it will be fast either way, so it's left up to personal preference. The fun begins when the full program starts alternating from algorithm A to B.