Archive for July, 2008

How we get improved performance on a single core - Part 3

Tuesday, July 15th, 2008
Posted By Stefanus Du Toit

This is the third, and last, post in a series of posts about how we can achieve improved performance over regular C++ code even when running on a single core. I’ve talked about our programming model and runtime program generation previously. In this post, I’ll discuss our runtime code generation mechanism.

As mentioned in my last post, RapidMind generates machine code at runtime. This is similar to just-in-time compilation, but is done at very specific (and controllable) points in an application’s lifetime – typically during application initialization. The responsibility of generating machine code for a specific hardware target belongs to RapidMind’s backends. Each backend includes code generation support for any targets it supports. For example, the OpenGL backend for GPUs generates OpenGL shading language programs corresponding to a user’s computations. Backends like the x86 and Cell backends generate machine code for those architectures using a custom code generation stack, including a backend optimizer, scheduler, register allocator, etc.

(more…)