These days, the main bottleneck of almost any real-time software is its memory access. There are a lot of things to consider in this area, such as cache coherency, class and virtual function overheads, data structures and much more. The main reason is the performance gap that exists between CPU and memory.

Data Oriented Design (DOD) is a popular thing nowadays, and you hear about using it form almost anybody that has developed any real-time software.

In F180 field, the AI software has to be executed with the exact frequency of 60 Hz. So we have just 16 mS to execute our 120k+ lines AI software which does vision processing, filtering and fusion, decision making, path planning, command generation and wireless communication.

One simple solution that many teams have used is to carry powerful PCs, even multiple PCs for each team, and run their software on it. But in my opinion it is not an engineering solution. So I put some efforts to improve the performance. The most important aspect about improving a software performance, is macro optimization. Therefore I refactored the software with the data flow in my mind and made it data oriented.

As a comparison, our AI processing takes about 1.2 mS on a MacBook, while other teams carry PCs with $1000+ CPUs, and still have problems keeping the frequency at 60 Hz!

I gave a talk about our optimizations in RoboCup 2012 held at Mexico City:

Here is the presentation slides: Immortals 2012 ETDP Presentation

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s