Commit a2113828 authored by Noric Couderc's avatar Noric Couderc
Browse files

We memoize counters for costs

If you already obtained the cycles, no need to evaluate it again.
parent 6b438790
......@@ -52,6 +52,10 @@ class Experiment(val numberIterations : Int,
var currentIterationResults : MutableMap<Feature, Double> = mutableMapOf()
override fun visitPAPICounter(c: PAPICounter) {
if (currentIterationResults.containsKey(c)) {
return;
}
val values = currentIteration.filter { it.featureName == c.toHexa() }
.map { it.featureValue }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment