Analyzing per-component energy consumption of evolutionary algorithms implemented in low-level languages: Comparison of C++ and zig in key evolutionary algorithm functions

Trying to design software systems in such a way that they consume a minimal amount of energy is simply good engineering practice. Scientific software is no exception; in this case, we will put our focus on evolutionary algorithms and the energy consumption patterns in memory and CPU for two different, low-level languages: The mainstream C++ and the emerging zig. By setting up a methodology that gives us a precise measure of the energy spent by key evolutionary algorithm functions, we can give the scientific software engineer some actionable insights on how to write energy-conscious, and thus energy-thrifty, evolutionary algorithms. Our experiments show that, even with very low energy consumption in both cases, C++ can achieve a significant reduction in energy consumption for some integer-based fitness functions, as well as very good performance on classical genetic operators. Besides, the experimental results have a low variability, as compared to zig, making it in the short and medium run the best of the two languages for evolutionary algorithms.

Authors

Institutions

Publication Details

Journal
Proceedings of the Genetic and Evolutionary Computation Conference Companion
Published
2025-07-14
DOI
https://doi.org/10.1145/3712255.3726694
Primary Topic
Evolutionary Algorithms and Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Analyzing per-component energy consumption of evolutionary algorithms implemented in low-level languages: Comparison of C++ and zig in key evolutionary algorithm functions

G. Romero, J. J. Merelo, Mario García-Valdéz
Proceedings of the Genetic and Evolutionary Computation Conference Companion
Evolutionary Algorithms and Applications
article

Analyzing per-component energy consumption of evolutionary algorithms implemented in low-level languages: Comparison of C++ and zig in key evolutionary algorithm functions

G. Romero, J. J. Merelo, Mario García-Valdéz
article en

Abstract

Trying to design software systems in such a way that they consume a minimal amount of energy is simply good engineering practice. Scientific software is no exception; in this case, we will put our focus on evolutionary algorithms and the energy consumption patterns in memory and CPU for two different, low-level languages: The mainstream C++ and the emerging zig. By setting up a methodology that gives us a precise measure of the energy spent by key evolutionary algorithm functions, we can give the scientific software engineer some actionable insights on how to write energy-conscious, and thus energy-thrifty, evolutionary algorithms. Our experiments show that, even with very low energy consumption in both cases, C++ can achieve a significant reduction in energy consumption for some integer-based fitness functions, as well as very good performance on classical genetic operators. Besides, the experimental results have a low variability, as compared to zig, making it in the short and medium run the best of the two languages for evolutionary algorithms.

Proceedings of the Genetic and Evolutionary Computation Conference Companion
Universidad de Granada (ES), Instituto Tecnológico de Tijuana (MX)
Affordable and clean energy
Openalex Percentile: Top 61%
Evolutionary Algorithms and Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.