July 16, 2009

Rethinking code optimization for mobile and multicore

Artificial intelligence could be the key to building more efficient software for mobile platforms and multicore chips. MilePost is giving it a shot

It's a complex process -- and there are plenty of research papers available if you want to delve deeper -- but in a nutshell, it works by analyzing the source code input to find specific "features" that might be good candidates for optimization. In this context, features might include such traits as the number of subroutines in the code that take a lot of parameters, whether there are a lot of nested loops, or which types of math the program uses most often. Once MilePost has built a catalog of all the features present in a given program, it can use statistical techniques to decide which optimizations will yield the best results and readjust its own modular design as appropriate.

This isn't so different from what human compiler developers have been doing for years, but for humans the process is much more arbitrary. Often the best they can do is to guess which optimizations will be desirable the most often. MilePost has the advantage of basing its decisions on statistical data gathered from real-world use cases in specific environments. Initial tests by IBM have shown that MilePost can improve performance by as much as 18 percent versus the code output by traditional compilers.

In addition, the MilePost project has since spawned the Collective Tuning Initiative, a Web-based collaboration effort with a goal of accumulating still more information that can be applied to improve self-modifying compilers, such as MilePost.

It's about more than just speed
It's fair to ask how important this kind of low-level optimization really is, when processors seem to be gaining speed by leaps and bounds each year. Most users probably don't use half the processor power of their PCs already. But while that may be true on the desktop, it's a different story in the world of mobile devices. When targeting devices with low-powered processors and limited resources, code optimization isn't an option -- it's essential.

Developers of software for handhelds often target several platforms at once. Achieving equivalent performance on each platform can require extensive optimization, and if no mature optimizing compilers exist, that optimization has to be done by hand. This process might take months, adding considerable overhead to the development budget and delaying time to market. But a machine-learning compiler that adapts to each platform individually could eliminate much of this drudgework, slashing development costs in the process.

additional resources
White Paper - How to Improve Delivery of Advanced Web Applications

White Paper

Virtual Workforce: The Key to Expanding The Business While Cutting Costs

Get the independent advice and expertise you need to support a virtual workforce.

Go inside:
The three-step approach to making a virtual workforce a reality.
The four flavors of client virtualization technologies.
The three key initiatives that solve IT challenges.
Download now »
White Paper: Successfully Secure Your Wireless LAN With Wi-Fi firewalls.

White Paper

Addressing Linux Threats Leveraging Fewer Resources

The increase in Linux popularity has increased the frequency and sophistication of malware attacks. Read this 2 page white paper now to learn how you can protect your Linux environment with real-time protection that is certified by all major Linux vendors.

Download now »
White Paper - The 2009 Handbook of Application Delivery

White Paper

The 2009 Handbook of Application Delivery

Ensuring acceptable application delivery will become even more difficult over the next few years. As a result, IT organizations need to ensure that the approach that they take to resolving the current application delivery challenges can scale to support the emerging challenges. This handbook elaborates on the key tasks associated with planning, optimization, management and control and provides decision criteria to help IT organizations choose appropriate solutions.

Download now »
White Paper - Is Your Backup System Outdated?

White Paper

Mid-range Storage Considerations

A common misconception is that mid-range storage requirements are dramatically different than that of a larger enterprise. Mid-range storage users may require less capacity, but they have similar functionality and management requirements. This ESG paper examines mid-range storage needs and reviews a new solution that adjusts size while retaining value, performance and functionality.

Download now »
rdm 16-Jul-09 12:54pm
I am going to have to disagree with the statement that "All programmers want their code to run faster or take up less space (and sometimes both)." [] First, on a purely cynical level, we would not be seeing code bloat up to consume the available resources of our big modern machines if this was a real imperative for programmers. [] However, from a practical point of view, we only concern ourselves with efficiency when we encounter bottlenecks. [] Ok, sure, a lot of programmers adopt various random practices in the name of efficiency. But most of those practices have very little to do with real efficiencies. Real optimization involves measurements, not rules. If you can not measure the efficiency gained by some coding technique, you did not gain any real efficiency. (And your typical computer will typically introduce "noise variations" perhaps on the order of 30%..50% in your timings -- and gains below the noise floor are often enough not worth bothering with. This becomes especially true when re-architecting critical parts of the code -- perhaps using mathematical equivalences -- can often enough yield order-of-magnitude efficiency improvements.) [] Anyways... usually, for new code, the right approach is to write things simply, get the algorithm right, and then start dealing with resource issues. But for updates to existing code this gets complicated and I can not do the subject justice in this "short" comment.
applecar 6-Nov-09 3:54am
Official Ed Hardy Store for all Clothing and Gear by Christian Audigier. The lifestyle brand is inspired by vintage tattoo art incorporating apparel Ed Hardy Clothing Ed Hardy Shoes Ed Hardy Hoodies ED Hardy Long Sleeve Ed Hardy Handbags

Sign up to receive InfoWorld Resource Alerts

Subscribe to the Today's Headlines: First Look Newsletter

Find out what will be news for the day, with our first-thing-in-the-morning briefing.

©1994-2010 Infoworld, Inc.