Can AI really optimize your code?

Publié le 23 May 2025

AI Writes Code. But Does It Write Good Code?

It’s no secret that everyone is talking about AI these days. If AI has entered our personal lives, it has also entered our professional lives as developers. Several tools have emerged to reduce software development time, including GitHub Copilot, Codeium, and CodeGPT

Some of these tools are even used by members of the WedoLow team (hey, Copilot!). Since development time is the most critical variable in embedded software development, developers appreciate this type of tool and are using it more and more. 

But can these tools generate high-performance, efficient code? That’s what we’ll explore in this deep dive.

AI told us to generate this image

AI Usage Is Growing Among Developers

Do you use AI-based code generation tools?

According to Stack Overflow’s 2024 Developer Survey, 63.2% of the over 46,000 professional developer respondents were using such tools, including some at WedoLow. However, despite the gains in productivity and volume of code produced, questions arise about the performance and quality of the associated code.

A Closer Look at Code Quality Concerns

At WedoLow, we specialize in code performance. From this perspective, we will examine what AI-based code generation tools can offer. However, it’s also interesting to examine another metric: code quality.

GitClear conducted a study on the subject, revealing that the use of these tools is associated with a deterioration in code quality. The study reveals the evolution of “code churn”: the percentage of lines reverted or updated within two weeks of being written. This percentage increased by 26% in one year, and the trend is accelerating, as is the increase in copy/paste.

Time Savings vs. Performance: A Delicate Balance

These metrics raise serious questions about the productivity gains achieved by these tools, among other things. Here at WedoLow, our analysis is that AI-based tools can indeed save time on simple tasks and functionalities, or on first-time writing, but cannot be used for high-performance code. Developers must maintain a critical eye and question the quality and performance of the code produced.

But when it comes to performance, which is our specialty at WedoLow, how does it measure up? Can AI-generated code perform well on an embedded target?

Let’s see what AI code is really worth in embedded applications

We propose a live experience. The idea is simple:

  1. Use an AI-based code generation tool to design and generate code for a specific functionality. For example, you could ask it to write a signal processing filter in C or C++ to run on a specified CPU.
  2. We’ll have prepared the test bench to read the filter’s input data, execute it, produce the output, and store it, all on the specified CPU. All of this will be done on the specified CPU.
  3. Run the entire code through the beLow-Explore product to analyze its performance debt. You never know, we might find some pleasant surprises!