-
Notifications
You must be signed in to change notification settings - Fork 325
Add blog post “sustainable scala” #1310
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
Conversation
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.
This was really interesting reading.
One thing I'm wondering is:
I assume that in general, the longer a program takes to run, the more energy it's consuming. You write:
They compared the execution time, energy consumption, and memory consumption [...]
Did they ever find that execution time and energy consumption didn't simply vary in tandem? If so, then: in what way, under what circumstances?
Anyway, this is just something I was personally curious about. If you think other readers might be curious about it as well, you might consider answering it in the post itself.
The energy consumption is proportional to the execution time: Energy (J) = Time (s) × Power (W). However, it seems (based on the measurements) that the power is not constant, so the assumption “the faster, the greener” may be too simplistic, although it is often true. |
I think in benchmarks this might be true, but not necessarily in real world code. Think about async vs blocking database access. The async one might actually take a bit longer, but it consumes less resources (not blocking a thread) and intuitively it should also spend less energy per transaction. |
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.
Great article!
30bc167
to
5f1f267
Compare
I put this up on Reddit at https://www.reddit.com/r/scala/comments/rgj6i1/sustainable_scala_blog_post_by_julien_richardfoy/ (hehe, the post title includes Wojciech, but only Julien made it into the URL) @julienrf I assume scala_lang will tweet it out...? |
May I ask a review? 🙏