Skip to Content
Building Green Software
book

Building Green Software

by Anne Currie, Sarah Hsu, Sara Bergman
March 2024
Intermediate to advanced
244 pages
6h 59m
English
O'Reilly Media, Inc.
Book available
Content preview from Building Green Software

Chapter 3. Code Efficiency

I feel the need—the need for speed.

Maverick

Whenever the subject of software efficiency comes up, the first question that springs to mind for most developers is, “What’s the fastest and therefore most efficient coding language? Is it Rust, C, or Go?” Maybe it’ll surprise us all and actually be Java! (Dear reader, it isn’t. However, Java is doing work in this area. One day Java, or something similar, could be the most efficient coding language.)

Efficiency Is Everything—or Is It?

Controversially, as much as we love those languages, we’re going to argue that, for most folk, programming in them is not the optimum way to build green software. In fact, we’re going to attempt to convince you that although code efficiency is a tool in your toolbox, it is not the first one most engineers should reach for.

For most of us, writing more streamlined code is almost certainly a less effective way to reduce our carbon footprint than a combination of making operational efficiency improvements, architecting for demand shifting and shaping, and choosing the right platform.

There are circumstances where active code efficiency on your part is vital to greenness. If you are writing code that will be deployed at hyper scale, it must be optimized. You are presumably already doing that to manage your costs and SLAs and reading books specifically designed to help you with that skilled and context-specific task. However, even if you’re not running systems at scale, as a producer ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Facilitating Software Architecture

Facilitating Software Architecture

Andrew Harmel-Law

Publisher Resources

ISBN: 9781098150617Errata Page