Created
July 11, 2013 18:54
-
-
Save axel22/5978170 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.scalameter.api._ | |
object MyRangeTest extends PerformanceTest.Regression { | |
override def reporter: Reporter = Reporter.Composite( | |
new RegressionReporter( | |
RegressionReporter.Tester.Accepter(), | |
RegressionReporter.Historian.Complete()), | |
HtmlReporter(embedDsv = true) | |
) | |
def persistor = new SerializationPersistor() | |
val sizes = Gen.range("size")(1000000, 2000000, 500000) | |
val lists = for (sz <- sizes) yield (0 until sz).toList | |
performance of "List" in { | |
measure method "map" in { | |
using(lists) config ( | |
exec.benchRuns -> 20, | |
exec.independentSamples -> 1 | |
) in { xs => | |
xs.map(_ + 1) | |
} | |
} | |
} | |
type SameType = this.type | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment