-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Refactored Chain
and CollectiveMonoid
benchmarks
#4264
Conversation
Chain
and CollectiveMonoid
benchmarks
build.sbt
Outdated
libraryDependencies ++= Seq( | ||
"org.scalaz" %% "scalaz-core" % "7.3.6", | ||
"co.fs2" %% "fs2-core" % "3.2.8" | ||
), |
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.
Thanks for all your work on this! Actually we should just drop Chunk
from the benchmark because it creates a circular dependency with fs2. See #4194 (comment).
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.
Hmm, I'll remove it so, thanks for noticing it.
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.
Removed it in c3ec714
Now the ETA for the jmh run of CollectiveMonoid
is just 04:18:20 for each scala version 😂
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.
That means that I need 13 hours of ice packs 😇
Wow, this is really cool, so now we can compare across Scala versions! |
Yep. Another thing that it's worth doing once these tests are executed on a reliable machine is updating the documentation of |
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.
Thanks, long overdue!
Adding
|
so my read is that Chain offers significant wins over List and Vector for concatenation heavy workloads (the accumulate benchmark) and that it is nearly as fast or faster than List for other cases. I think this is inline with our use cases: Chain is for fast concatenations. |
I think so. I'll try to shave some time to produce the |
|
Last bit of "On my laptop™ benchmarks"
|
@key-eugene you made a comment regarding the claim that vector isn't slower than list or chain in 2.13. I thought I would point out these benchmarks to you. Please update them if you think they do not reflect the real story. |
Hello 👋 !
As the title states, I refactored these two benchmarks, moving them out of
scala-2.12
to testChain
vsVector
in more Scala versions so that the benchmarks can be more "recent" than before.I replaced the old
fs2.Catenable
withfs2.Chunk
and removed thespire-math Chain
tests (since I was unable to find a 2.13.x or 3.x version)I have been able to run locally the
CollectiveMonoid
test in the 3 scala versions to gather some data:Testing setup
It might be worth saying that I had to turn on the air conditioning system and rub the laptop with an ice pack to avoid thermal throttling, so do not take these numbers too seriously, please.These numbers result from testing on my machine and should not be mindlessly generalized. It might be worth using some perf test infrastructure rather than my or any other local machine.