Cookies Policy
The website need some cookies and similar means to function. If you permit us, we will use those means to collect data on your visits for aggregated statistics to improve our service. Find out More
Accept Reject
  • Menu
About

About

I am a a Computer Science Postdoc working on reducing, analyzing, and optimizing the energy consumption levels for software, by using source code analysis and manipulation techniques. I was also awarded an FCT grant for my PhD research. I am one of the founding members of the Green Software for Space Control Mission (GreenSSCM) project, the Software Repositories for Green Computing FLAD/NSF project, and the Green Software Lab: Green Computing as an Engineering Discipline (GSL) project.

I concluded my PhD at the University of Minho, under the MAP-i doctoral programme with the thesis titled "Energyware Engineering: Techniques and Tools for Green Software Development" under the Green Software Lab (GSL) project . I received my MSc degree in Informatics Engineering in 2013, with my thesis "Querying for Model-Driven Spreadsheets" under the SpreadSheets as a Programming Paradigm (SSaaPP) project.

Currently, my research interests focus on green computing, human-computer interaction, and source code analysis and manipulation.

Interest
Topics
Details

Details

  • Name

    Rui Alexandre Pereira
  • Cluster

    Computer Science
  • Role

    External Research Collaborator
  • Since

    01st July 2013
002
Publications

2022

WebAssembly versus JavaScript: Energy and Runtime Performance

Authors
De Macedo, J; Abreu, R; Pereira, R; Saraiva, J;

Publication
2022 INTERNATIONAL CONFERENCE ON ICT FOR SUSTAINABILITY (ICT4S 2022)

Abstract
The worldwide Web has dramatically evolved in recent years. Web pages are dynamic, expressed by programs written in common programming languages given rise to sophisticated Web applications. Thus, Web browsers are almost operating systems, having to interpret/compile such programs and execute them. Although JavaScript is widely used to express dynamic Web pages, it has several shortcomings and performance inefficiencies. To overcome such limitations, major IT powerhouses are developing a new portable and size/load efficient language: WebAssembly. In this paper, we conduct the first systematic study on the energy and run-time performance of WebAssembly and JavaScript on the Web. We used micro-benchmarks and also real applications in order to have more realistic results. Preliminary results show that WebAssembly, while still in its infancy, is starting to already outperform JavaScript, with much more room to grow. A statistical analysis indicates that WebAssembly produces significant performance differences compared to JavaScript. However, these differences differ between micro-benchmarks and real-world benchmarks. Our results also show that WebAssembly improved energy efficiency by 30%, on average, and showed how different WebAssembly behaviour is among three popular Web Browsers: Google Chrome, Microsoft Edge, and Mozilla Firefox. Our findings indicate that WebAssembly is faster than JavaScript and even more energy-efficient. Additionally, our benchmarking framework is also available to allow further research and replication.

2022

Energy Efficiency of Web Browsers in the Android Ecosystem

Authors
Gonçalves, N; Rua, R; Cunha, J; Pereira, R; Saraiva, J;

Publication
CoRR

Abstract

2021

Ranking programming languages by energy efficiency

Authors
Pereira, R; Couto, M; Ribeiro, F; Rua, R; Cunha, J; Fernandes, JP; Saraiva, J;

Publication
SCIENCE OF COMPUTER PROGRAMMING

Abstract
This paper compares a large set of programming languages regarding their efficiency, including from an energetic point-of-view. Indeed, we seek to establish and analyze different rankings for programming languages based on their energy efficiency. The goal of being able to rank programming languages based on their energy efficiency is both recent, and certainly deserves further studies. We have taken rigorous and strict solutions to 10 well defined programming problems, expressed in (up to) 27 programming languages, from the well known Computer Language Benchmark Game repository. This repository aims to compare programming languages based on a strict set of implementation rules and configurations for each benchmarking problem. We have also built a framework to automatically, and systematically, run, measure and compare the energy, time, and memory efficiency of such solutions. Ultimately, it is based on such comparisons that we propose a series of efficiency rankings, based on single and multiple criteria. Our results show interesting findings, such as how slower/faster languages can consume less/more energy, and how memory usage influences energy consumption. We also present a simple way to use our results to provide software engineers and practitioners support in deciding which language to use when energy efficiency is a concern. In addition, we further validate our results and rankings against implementations from a chrestomathy program repository, Rosetta Code., by reproducing our methodology and benchmarking system. This allows us to understand how the results and conclusions from our rigorously and well defined benchmarked programs compare to those based on more representative and real-world implementations. Indeed our results show that the rankings do not change apart from one programming language.

2021

Bringing Green Software to Computer Science Curriculum: Perspectives from Researchers and Educators

Authors
Saraiva, J; Zong, Z; Pereira, R;

Publication
ITiCSE 2021: 26th ACM Conference on Innovation and Technology in Computer Science Education, Virtual Event, Germany, June 26 - July 1, 2021.

Abstract
Only recently has the software engineering community started conducting research on developing energy efficient software, or green software. This is shadowed when compared to the research already produced in the computer hardware community. While research in green software is rapidly increasing, several recent studies with software engineers show that they still miss techniques, knowledge, and tools to develop greener software. Indeed, all such studies suggest that green software should be part of a modern Computer Science Curriculum. In this paper, we present survey results from both researchers' and educators' perspective on green software education. These surveys confirm the lack of courses and educational material for teaching green software in current higher education. Additionally, we highlight three key pedagogical challenges in bringing green software to computer science curriculum and discussed existing solutions to address these key challenges. We firmly believe that 'green thinking"and the broad adoption of green software in computer science curriculum can greatly benefit our environment, society, and students in an era where software is everywhere and evolves in an unprecedented speed. © 2021 Owner/Author.

2021

GreenHub: a large-scale collaborative dataset to battery consumption analysis of android devices

Authors
Pereira, R; Matalonga, H; Couto, M; Castor, F; Cabral, B; Carvalho, P; de Sousa, SM; Fernandes, JP;

Publication
EMPIRICAL SOFTWARE ENGINEERING

Abstract
Context The development of solutions to improve battery life in Android smartphones and the energy efficiency of apps running on them is hindered by diversity. There are more than 24k Android smartphone models in the world. Moreover, there are multiple active operating system versions, and a myriad application usage profiles. Objective In such a high-diversity scenario, profiling for energy has only limited applicability. One would need to obtain information about energy use in real usage scenarios to make informed, effective decisions about energy optimization. The goal of our work is to understand how Android usage, apps, operating systems, hardware, and user habits influence battery lifespan. Method We leverage crowdsourcing to collect information about energy in real-world usage scenarios. This data is collected by a mobile app, which we developed and made available to the public through Google Play store, and periodically uploaded to a centralized server and made publicly available to researchers, app developers, and smartphone manufacturers through multiple channels (SQL, REST API, zipped CSV/Parquet dump). Results This paper presents the results of a wide analysis of the tendency several smart-phone characteristics have on the battery charge/discharge rate, such as the different models, brands, networks, settings, applications, and even countries. Our analysis was performed over the crowdsourced data, and we have presented findings such as which applications tend to be around when battery consumption is the highest, do users from different countries have the same battery usage, and even showcase methods to help developers find and improve energy inefficient processes. The dataset we considered is sizable; it comprises 23+ million (anonymous) data samples stemming from a large number of installations of the mobile app. Moreover, it includes 700+ million data points pertaining to processes running on these devices. In addition, the dataset is diverse. It covers 1.6k+ device brands, 11.8k+ smartphone models, and more than 50 Android versions. We have been using this dataset to perform multiple analyses. For example, we studied what are the most common apps running on these smartphones and related the presence of those apps in memory with the battery discharge rate of these devices. We have also used this dataset in teaching, having had students practicing data analysis and machine learning techniques for relating energy consumption/charging rates with many other hardware and software qualities, attributes and user behaviors. Conclusions The dataset we considered can support studies with a wide range of research goals, be those energy efficiency or not. It opens the opportunity to inform and reshape user habits, and even influence the development of both hardware (manufacturers) and software (developers) for mobile devices. Our analysis also shows results which go outside of the common perception of what impacts battery consumption in real-world usage, while exposing new varied, complex, and promising research avenues.