-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Scala Doku Benchmark #173
Conversation
Stupid question: why is CafeSat inside our repository as full source code? It seems that CafeSat is not available for Maven/Ivy as JAR but here they clone it in Sbt (but perhaps something prevents us to use the same approach?): lazy val root = (project in file(".")).
...
).
dependsOn(cafeSat)
lazy val cafeSat = {
val commit = "e39e2fb11b66b5daf8002cb5bf457a2a2f889e05"
val githubLink = s"git://github.com/regb/cafesat.git#$commit"
RootProject(uri(githubLink))
} |
Sry accidentally closed the PR (buttons to close to each other ;-) ) |
I think that Maven has a decent guarantee that it will keep artifacts forever, while GitHub references are volatile. Using GitHub uris essentially opens an easier door to breaking the suite. And even though they are no longer actively maintaining CafeSAT, it still exercises a lot of functional-style code and collections transformations, and it seems useful to have it as a staging benchmark. |
fork in IntegrationTest := true, | ||
logBuffered in IntegrationTest := false, | ||
parallelExecution in Test := true, | ||
libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.1" % "test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dependency on scalatest
2.11 is weird, but since we're only running the main artifact, it shouldn't be important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a left over from some changes I did when pulling in the sources. I will check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be that CafeSAT had been using Scala 2.11.
benchmarks/scala-stdlib/build.sbt
Outdated
@@ -1,5 +1,9 @@ | |||
lazy val renaissanceCore = RootProject(uri("../../renaissance-core")) | |||
|
|||
lazy val scalaSMTLib = RootProject(uri("scala-smtlib")) | |||
|
|||
lazy val scalaCafeSAT = RootProject(uri("cafesat")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, we should open a new subproject for benchmark, such as cafesat
, and not pollute scala-stdlib
with this.
At some point, we will potentially transition to a newer Scala version in scala-stdlib
, and at that point this will make migration harder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean a new group altogether containing sub projects for smt and cafesat and the doku benchmark?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
Okay, that makes sense. Not that I like it ;-) |
@Group("scala-stdlib") | ||
@Summary("Solves Sudoku Puzzles using Scala collections.") | ||
@Licenses(Array(License.MIT)) | ||
@Repetitions(10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting how the performance degrades over time. Have tried a run with many more iterations to make sure that warmup is sufficient ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it degrades quite a bit.
On my machine it stays between 7.8sec and 8.3
See 100 iterations
$JAVA_HOME/bin/java -jar target/renaissance-gpl-0.9.0.jar scala-doku -r 100
====== scala-doku (scala-stdlib), iteration 0 started ======
====== scala-doku (scala-stdlib), iteration 0 completed (7295.563 ms) ======
====== scala-doku (scala-stdlib), iteration 1 started ======
====== scala-doku (scala-stdlib), iteration 1 completed (7740.79 ms) ======
====== scala-doku (scala-stdlib), iteration 2 started ======
====== scala-doku (scala-stdlib), iteration 2 completed (7651.956 ms) ======
====== scala-doku (scala-stdlib), iteration 3 started ======
====== scala-doku (scala-stdlib), iteration 3 completed (7443.26 ms) ======
====== scala-doku (scala-stdlib), iteration 4 started ======
====== scala-doku (scala-stdlib), iteration 4 completed (7442.337 ms) ======
====== scala-doku (scala-stdlib), iteration 5 started ======
====== scala-doku (scala-stdlib), iteration 5 completed (7880.45 ms) ======
====== scala-doku (scala-stdlib), iteration 6 started ======
====== scala-doku (scala-stdlib), iteration 6 completed (7876.23 ms) ======
====== scala-doku (scala-stdlib), iteration 7 started ======
====== scala-doku (scala-stdlib), iteration 7 completed (7911.213 ms) ======
====== scala-doku (scala-stdlib), iteration 8 started ======
====== scala-doku (scala-stdlib), iteration 8 completed (7897.584 ms) ======
====== scala-doku (scala-stdlib), iteration 9 started ======
====== scala-doku (scala-stdlib), iteration 9 completed (7860.457 ms) ======
====== scala-doku (scala-stdlib), iteration 10 started ======
====== scala-doku (scala-stdlib), iteration 10 completed (7941.158 ms) ======
====== scala-doku (scala-stdlib), iteration 11 started ======
====== scala-doku (scala-stdlib), iteration 11 completed (7954.829 ms) ======
====== scala-doku (scala-stdlib), iteration 12 started ======
====== scala-doku (scala-stdlib), iteration 12 completed (8069.049 ms) ======
====== scala-doku (scala-stdlib), iteration 13 started ======
====== scala-doku (scala-stdlib), iteration 13 completed (7930.362 ms) ======
====== scala-doku (scala-stdlib), iteration 14 started ======
====== scala-doku (scala-stdlib), iteration 14 completed (7935.664 ms) ======
====== scala-doku (scala-stdlib), iteration 15 started ======
====== scala-doku (scala-stdlib), iteration 15 completed (7930.514 ms) ======
====== scala-doku (scala-stdlib), iteration 16 started ======
====== scala-doku (scala-stdlib), iteration 16 completed (7965.733 ms) ======
====== scala-doku (scala-stdlib), iteration 17 started ======
====== scala-doku (scala-stdlib), iteration 17 completed (7952.007 ms) ======
====== scala-doku (scala-stdlib), iteration 18 started ======
====== scala-doku (scala-stdlib), iteration 18 completed (7934.641 ms) ======
====== scala-doku (scala-stdlib), iteration 19 started ======
====== scala-doku (scala-stdlib), iteration 19 completed (8126.194 ms) ======
====== scala-doku (scala-stdlib), iteration 20 started ======
====== scala-doku (scala-stdlib), iteration 20 completed (7937.435 ms) ======
====== scala-doku (scala-stdlib), iteration 21 started ======
====== scala-doku (scala-stdlib), iteration 21 completed (7903.58 ms) ======
====== scala-doku (scala-stdlib), iteration 22 started ======
====== scala-doku (scala-stdlib), iteration 22 completed (7918.003 ms) ======
====== scala-doku (scala-stdlib), iteration 23 started ======
====== scala-doku (scala-stdlib), iteration 23 completed (7873.369 ms) ======
====== scala-doku (scala-stdlib), iteration 24 started ======
====== scala-doku (scala-stdlib), iteration 24 completed (7853.768 ms) ======
====== scala-doku (scala-stdlib), iteration 25 started ======
====== scala-doku (scala-stdlib), iteration 25 completed (7892.393 ms) ======
====== scala-doku (scala-stdlib), iteration 26 started ======
====== scala-doku (scala-stdlib), iteration 26 completed (7970.432 ms) ======
====== scala-doku (scala-stdlib), iteration 27 started ======
====== scala-doku (scala-stdlib), iteration 27 completed (7912.716 ms) ======
====== scala-doku (scala-stdlib), iteration 28 started ======
====== scala-doku (scala-stdlib), iteration 28 completed (7910.841 ms) ======
====== scala-doku (scala-stdlib), iteration 29 started ======
====== scala-doku (scala-stdlib), iteration 29 completed (7868.315 ms) ======
====== scala-doku (scala-stdlib), iteration 30 started ======
====== scala-doku (scala-stdlib), iteration 30 completed (7904.546 ms) ======
====== scala-doku (scala-stdlib), iteration 31 started ======
====== scala-doku (scala-stdlib), iteration 31 completed (7923.313 ms) ======
====== scala-doku (scala-stdlib), iteration 32 started ======
====== scala-doku (scala-stdlib), iteration 32 completed (7895.506 ms) ======
====== scala-doku (scala-stdlib), iteration 33 started ======
====== scala-doku (scala-stdlib), iteration 33 completed (7917.952 ms) ======
====== scala-doku (scala-stdlib), iteration 34 started ======
====== scala-doku (scala-stdlib), iteration 34 completed (7954.212 ms) ======
====== scala-doku (scala-stdlib), iteration 35 started ======
====== scala-doku (scala-stdlib), iteration 35 completed (7938.572 ms) ======
====== scala-doku (scala-stdlib), iteration 36 started ======
====== scala-doku (scala-stdlib), iteration 36 completed (7965.098 ms) ======
====== scala-doku (scala-stdlib), iteration 37 started ======
====== scala-doku (scala-stdlib), iteration 37 completed (7942.275 ms) ======
====== scala-doku (scala-stdlib), iteration 38 started ======
====== scala-doku (scala-stdlib), iteration 38 completed (7986.694 ms) ======
====== scala-doku (scala-stdlib), iteration 39 started ======
====== scala-doku (scala-stdlib), iteration 39 completed (7922.645 ms) ======
====== scala-doku (scala-stdlib), iteration 40 started ======
====== scala-doku (scala-stdlib), iteration 40 completed (7918.326 ms) ======
====== scala-doku (scala-stdlib), iteration 41 started ======
====== scala-doku (scala-stdlib), iteration 41 completed (8010.682 ms) ======
====== scala-doku (scala-stdlib), iteration 42 started ======
====== scala-doku (scala-stdlib), iteration 42 completed (8050.451 ms) ======
====== scala-doku (scala-stdlib), iteration 43 started ======
====== scala-doku (scala-stdlib), iteration 43 completed (7895.714 ms) ======
====== scala-doku (scala-stdlib), iteration 44 started ======
====== scala-doku (scala-stdlib), iteration 44 completed (8159.713 ms) ======
====== scala-doku (scala-stdlib), iteration 45 started ======
====== scala-doku (scala-stdlib), iteration 45 completed (8165.301 ms) ======
====== scala-doku (scala-stdlib), iteration 46 started ======
====== scala-doku (scala-stdlib), iteration 46 completed (8181.688 ms) ======
====== scala-doku (scala-stdlib), iteration 47 started ======
====== scala-doku (scala-stdlib), iteration 47 completed (8228.609 ms) ======
====== scala-doku (scala-stdlib), iteration 48 started ======
====== scala-doku (scala-stdlib), iteration 48 completed (8175.911 ms) ======
====== scala-doku (scala-stdlib), iteration 49 started ======
====== scala-doku (scala-stdlib), iteration 49 completed (8146.763 ms) ======
====== scala-doku (scala-stdlib), iteration 50 started ======
====== scala-doku (scala-stdlib), iteration 50 completed (8163.341 ms) ======
====== scala-doku (scala-stdlib), iteration 51 started ======
====== scala-doku (scala-stdlib), iteration 51 completed (8159.749 ms) ======
====== scala-doku (scala-stdlib), iteration 52 started ======
====== scala-doku (scala-stdlib), iteration 52 completed (8239.117 ms) ======
====== scala-doku (scala-stdlib), iteration 53 started ======
====== scala-doku (scala-stdlib), iteration 53 completed (8157.191 ms) ======
====== scala-doku (scala-stdlib), iteration 54 started ======
====== scala-doku (scala-stdlib), iteration 54 completed (8136.763 ms) ======
====== scala-doku (scala-stdlib), iteration 55 started ======
====== scala-doku (scala-stdlib), iteration 55 completed (8165.647 ms) ======
====== scala-doku (scala-stdlib), iteration 56 started ======
====== scala-doku (scala-stdlib), iteration 56 completed (8214.203 ms) ======
====== scala-doku (scala-stdlib), iteration 57 started ======
====== scala-doku (scala-stdlib), iteration 57 completed (8272.253 ms) ======
====== scala-doku (scala-stdlib), iteration 58 started ======
====== scala-doku (scala-stdlib), iteration 58 completed (8198.186 ms) ======
====== scala-doku (scala-stdlib), iteration 59 started ======
====== scala-doku (scala-stdlib), iteration 59 completed (8219.298 ms) ======
====== scala-doku (scala-stdlib), iteration 60 started ======
====== scala-doku (scala-stdlib), iteration 60 completed (8115.016 ms) ======
====== scala-doku (scala-stdlib), iteration 61 started ======
====== scala-doku (scala-stdlib), iteration 61 completed (8276.586 ms) ======
====== scala-doku (scala-stdlib), iteration 62 started ======
====== scala-doku (scala-stdlib), iteration 62 completed (8423.493 ms) ======
====== scala-doku (scala-stdlib), iteration 63 started ======
====== scala-doku (scala-stdlib), iteration 63 completed (8177.066 ms) ======
====== scala-doku (scala-stdlib), iteration 64 started ======
====== scala-doku (scala-stdlib), iteration 64 completed (8182.497 ms) ======
====== scala-doku (scala-stdlib), iteration 65 started ======
====== scala-doku (scala-stdlib), iteration 65 completed (8222.866 ms) ======
====== scala-doku (scala-stdlib), iteration 66 started ======
====== scala-doku (scala-stdlib), iteration 66 completed (8239.579 ms) ======
====== scala-doku (scala-stdlib), iteration 67 started ======
====== scala-doku (scala-stdlib), iteration 67 completed (8170.603 ms) ======
====== scala-doku (scala-stdlib), iteration 68 started ======
====== scala-doku (scala-stdlib), iteration 68 completed (8198.62 ms) ======
====== scala-doku (scala-stdlib), iteration 69 started ======
====== scala-doku (scala-stdlib), iteration 69 completed (8150.633 ms) ======
====== scala-doku (scala-stdlib), iteration 70 started ======
====== scala-doku (scala-stdlib), iteration 70 completed (8127.022 ms) ======
====== scala-doku (scala-stdlib), iteration 71 started ======
====== scala-doku (scala-stdlib), iteration 71 completed (8118.76 ms) ======
====== scala-doku (scala-stdlib), iteration 72 started ======
====== scala-doku (scala-stdlib), iteration 72 completed (8137.789 ms) ======
====== scala-doku (scala-stdlib), iteration 73 started ======
====== scala-doku (scala-stdlib), iteration 73 completed (8298.117 ms) ======
====== scala-doku (scala-stdlib), iteration 74 started ======
====== scala-doku (scala-stdlib), iteration 74 completed (8153.761 ms) ======
====== scala-doku (scala-stdlib), iteration 75 started ======
====== scala-doku (scala-stdlib), iteration 75 completed (8178.487 ms) ======
====== scala-doku (scala-stdlib), iteration 76 started ======
====== scala-doku (scala-stdlib), iteration 76 completed (8170.637 ms) ======
====== scala-doku (scala-stdlib), iteration 77 started ======
====== scala-doku (scala-stdlib), iteration 77 completed (8193.188 ms) ======
====== scala-doku (scala-stdlib), iteration 78 started ======
====== scala-doku (scala-stdlib), iteration 78 completed (8237.173 ms) ======
====== scala-doku (scala-stdlib), iteration 79 started ======
====== scala-doku (scala-stdlib), iteration 79 completed (8150.02 ms) ======
====== scala-doku (scala-stdlib), iteration 80 started ======
====== scala-doku (scala-stdlib), iteration 80 completed (8143.898 ms) ======
====== scala-doku (scala-stdlib), iteration 81 started ======
====== scala-doku (scala-stdlib), iteration 81 completed (8192.958 ms) ======
====== scala-doku (scala-stdlib), iteration 82 started ======
====== scala-doku (scala-stdlib), iteration 82 completed (8156.796 ms) ======
====== scala-doku (scala-stdlib), iteration 83 started ======
====== scala-doku (scala-stdlib), iteration 83 completed (8159.5 ms) ======
====== scala-doku (scala-stdlib), iteration 84 started ======
====== scala-doku (scala-stdlib), iteration 84 completed (8174.045 ms) ======
====== scala-doku (scala-stdlib), iteration 85 started ======
====== scala-doku (scala-stdlib), iteration 85 completed (8157.696 ms) ======
====== scala-doku (scala-stdlib), iteration 86 started ======
====== scala-doku (scala-stdlib), iteration 86 completed (8191.271 ms) ======
====== scala-doku (scala-stdlib), iteration 87 started ======
====== scala-doku (scala-stdlib), iteration 87 completed (8200.355 ms) ======
====== scala-doku (scala-stdlib), iteration 88 started ======
====== scala-doku (scala-stdlib), iteration 88 completed (8309.617 ms) ======
====== scala-doku (scala-stdlib), iteration 89 started ======
====== scala-doku (scala-stdlib), iteration 89 completed (8221.984 ms) ======
====== scala-doku (scala-stdlib), iteration 90 started ======
====== scala-doku (scala-stdlib), iteration 90 completed (8277.728 ms) ======
====== scala-doku (scala-stdlib), iteration 91 started ======
====== scala-doku (scala-stdlib), iteration 91 completed (8203.674 ms) ======
====== scala-doku (scala-stdlib), iteration 92 started ======
====== scala-doku (scala-stdlib), iteration 92 completed (8176.549 ms) ======
====== scala-doku (scala-stdlib), iteration 93 started ======
====== scala-doku (scala-stdlib), iteration 93 completed (8193.98 ms) ======
====== scala-doku (scala-stdlib), iteration 94 started ======
====== scala-doku (scala-stdlib), iteration 94 completed (8163.47 ms) ======
====== scala-doku (scala-stdlib), iteration 95 started ======
====== scala-doku (scala-stdlib), iteration 95 completed (8133.637 ms) ======
====== scala-doku (scala-stdlib), iteration 96 started ======
====== scala-doku (scala-stdlib), iteration 96 completed (8229.286 ms) ======
====== scala-doku (scala-stdlib), iteration 97 started ======
====== scala-doku (scala-stdlib), iteration 97 completed (8148.785 ms) ======
====== scala-doku (scala-stdlib), iteration 98 started ======
====== scala-doku (scala-stdlib), iteration 98 completed (8163.858 ms) ======
====== scala-doku (scala-stdlib), final iteration started ======
====== scala-doku (scala-stdlib), final iteration completed (8179.694 ms) ======
@axel22 & @farquet I created a new group and moved scalasat, smt and the docu benchmark there.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
I'll wait for this PR to get in before doing the 0.10.0 release that will include |
Looks good. The performance degradation is possibly to less frequently invoked methods (callers) getting compiled later than their callees, and overtaking their (previously separately compiled) callees. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM too.
This PR adds the Soduko Benchmark - shortly called Doku:
This benchmarks solves 2 soduko puzzles one with a few holes and one with exaclty one hole.
Results from my machine
Output