Do you want your ad here?

Contact us to get your ad seen by thousands of users every day!

[email protected]

Research: Measuring Energy Consumption in Programming Languages for AI Applications

  • September 15, 2025
  • 1481 Unique Views
  • 2 min read

Decades ago, I contributed to a very interesting project called SunSPOT at SUN Microsystems. It was a small device with wireless connectivity, built-in sensors, running on Java (compatible with runtime 1.6), and powered by battery. It enabled the design of small applications and the connection of additional hardware, or simply the utilization of available sensors. Later, together with Markus Hirt, we created the Robo4j framework. A small and lightweight Java framework that enables rapid assembly of robots or other IoT systems (JDK 21+). In Robo4j, we primarily used the Pi4j project for handling I/O operations on the Raspberry Pi platform with drivers created for specific hardware.

A question that has been concerning me over the decades is: what is the actual energy consumption of such Java-based systems?

The unprecedented growth of artificial intelligence (AI) and applications utilizing agentic AI systems from various vendors has elevated my question about energy consumption to the next level.

Similar to Raspberry Pi development or AI agent implementation, Python serves as the primary language choice due to its simplicity for prototyping applications without requiring strict attention to type definitions. Working with hardware your obvious choice would be C and with utilizing an agentic AI system there is possibility to use JavaScript, which is a very nice functional language, to prototype initial experiments or applications. After my colleague at OpenValue published his hackathon's simple energy consumption experiment, I became even more motivated to answer my question about energy consumption.

I created a fully automated framework in shell script that is capable of executing various runtimes and running parallel processes at the system level to obtain energy consumption measurements. I was eager to investigate how Java 21 and 17 compare against other languages like JavaScript, C, and Python. After gathering data and employing methodologies typically used in clinical studies, I acquired sufficient data to reach statistically significant conclusions.

The findings and conclusions have been added to my research article: 'Measuring Energy Consumption in Programming Languages for AI Applications (LINK).

I would like to thank all the people who helped me shape this research, as acknowledged in the article's Acknowledgments section.

I hope my research paper helps the community understand not only the importance of proper language platform selection, but also hardware choice considerations.

JC-AI Newsletter #1

Table of Contents article: GitHub CEO: manual coding remains key despite AI boomarticle: Expert Generalistsarticle: Emerging Patterns in Building GenAI Productsarticle: Complex, AI-generated software projects will never happenarticle: Silicon Valley Insider EXPOSES Cult-Like AI Companies | Aaron Bastani Meets Karen …

JC-AI Newsletter #2

Table of Contents In the first newsletter, we introduced a 14-day cadence, which means that this week it’s time for a new collection of articles from the fields of AI, LLM, Java and more.article: OpenAI CEO Sam Altman warns of …

JC-AI Newsletter #3

The first and second newsletters introduced a 14-day cadence, and even though it is the holiday season for many of us, we are sticking to the promised period. The current newsletter vol.3, brings a collection of valuable articles focusing on …

JC-AI Newsletter #4

Table of Contents Previous: 14 days have passed and it’s time for a new batch of readings that could shape developments in the field of artificial intelligence. The current newsletter vol. 4 offers us a closer look at several different …

Do we understand the value of AI knowledge ?

Table of Contents I remember the first time I saw a diagram of a neuron (Img.1.). I was a school kid, and among other hobbies, I was interested in the human brain, it fascinated me. I borrowed a book from …

Do you want your ad here?

Contact us to get your ad seen by thousands of users every day!

[email protected]

Comments (0)

Highlight your code snippets using [code lang="language name"] shortcode. Just insert your code between opening and closing tag: [code lang="java"] code [/code]. Or specify another language.

No comments yet. Be the first.

Mastodon

Subscribe to foojay updates:

https://foojay.io/feed/
Copied to the clipboard