ITworld.com
  Search  
ITworld Home Page ITworld Webcasts ITworld White Papers ITworld Newsletters ITworld News ITworld Topics Careers ITworld Voices ITwhirled Changing the way you view IT

Compilers, Interpreters and Bytecode

Computerworld 1/22/01

Alan Joch, Computerworld

Compilers are a bit like Florida election officials: They're suddenly in the spotlight after years of relative anonymity.

On this topic

The reason for the attention is the arrival of fast and complex 64-bit microprocessors, typified by Intel Corp.'s Itanium line. All of the sophisticated architectural innovations like parallelization and branch prediction, as well as the promises of significant performance gains, will mean little unless programmers can actually use these enhanced capabilities.

Writing code specifically for efficient parallel processing makes the difficult task of modern programming even more challenging. As a result, responsibility for achieving many of the performance claims of future 64-bit processors will fall on the shoulders of their next-generation compilers.

These performance-savvy compilers are already arriving from the research and development labs of Hewlett-Packard Co., Intel, MetaWare Inc., Microsoft Corp. and others. Last February, Mountain View, Calif.-based Silicon Graphics Inc. announced that its optimizing compilers delivered 30% to 100% better performance than existing compilers when teamed with Itanium processors running Linux.

Like their ancestors, optimizing compilers turn high-level programs into machine code. However, their extra contribution is making sure the translations handle memory -- particularly processor-level caches and parallelization -- as effectively as possible.

For example, Itanium processors are designed to simultaneously handle as many as six instructions per clock cycle. But to achieve this, a compiler must keep a steady stream of data flowing through the instruction pipeline.

One technique is to corral frequently used instructions into tight groups that the CPU can break into instruction strings and process simultaneously. Optimizing compilers also maximize cycle times through branch prediction, where the compiler attempts to predict the results of GOTO instructions, thus saving the CPU from having to locate outcomes dispersed throughout a program. Speculation, a related technique, has the optimizing compiler load instructions early, in an attempt to improve the CPU's performance. Some research labs, including the University of Illinois at Urbana-Champaign, have developed working examples of next-generation compilers.

Other Options

Interpreters also translate high-level programming code into machine language, but they do it line by line as the application runs. The computer that's running the high-level code must also run the interpreter in order to understand the program. Interpreters are valuable for testing newly written or modified code or teaching programming. Basic started as an interpreted teaching language.

Software that's compiled ahead of time runs faster than interpreted programs. Thus, compiled programs are preferred for large, enterprisewide applications, but they aren't as good for Internet Age applets destined to run on an unknown target machine.

The Java platform uses a third alternative, bytecode. With bytecode, a high-level program is translated into an intermediate form that can run on various hardware platforms. Java bytecode is morphed into machine-specific code through a real-time interpreter called the Java Virtual Machine (JVM). This JVM builds a dedicated mmemory space that houses applets and keeps them separate from the host system's storage.

Just-in-time (JIT) compilers promise to improve the performance of Java applications. Rather than letting the JVM run bytecode, a JIT compiler translates code into the host machine's native language. Thus, applications gain the performance enhancement of compiled code while maintaining Java's portability.

HP is taking a similar tack with its TurboChai compiler, a Java compiler for embedded applications. TurboChai aims to boost performance by translating the most frequently used code within a given embedded application. Through selective compiling, HP plans to control memory usage while achieving speeds comparable to those of JIT compilers. The TurboChai compiler takes Java bytecode as input, generates ANSI C source code and then uses any C compiler to generate optimized native code.

Last summer, Microsoft announced C#, an object-oriented programming language that embraces XML. Microsoft portrays the new language as a logical evolution of C and C++ for Web applications. Key modules will be the Common Language Runtime for C# and a special compiler that will turn traditional Cobol, Perl, Fortran or other code into an intermediate language that would then operate on Microsoft's new .Net platform.

End users are unlikely to become compiler junkies. Nevertheless, it may take a new generation of compilers to deliver the performance gains necessary to convince professionals that they need to embrace 64-bit hardware architectures.

Developments in Development Tools
Development ToolWhat’s NewGoals
Optimizing CompilersAchieve high CPU processing performance via parallelization, branch prediction, speculationHelp 64-bit processors realize their potential
Just-in-Time CompilersCompile real-time code on client machinesImprove performance of interpreted languages like Java
Selective CompilersCompile only the most frequently used code within embedded applicationsImprove performance without draining precious memory resources

Alan Joch is a freelance writer specializing in technology and business topics. His work appears in Fortune Small Business, Network Magazine, Healthcare Informatics, and other publications.




Sponsored Links

IP Networks Boost Secure Health Communications
AT&T provides secure communication to keep health care moving forward.
FREE SECURITY AUDIT RESOURCES
Take a Risk Assessment, get White Papers on the Latest Threats, listen to Malware Expert Webcasts.
Download your FREE BUSINESS IP TELEPHONY EBOOK!
Get your free 96 Page IP Telephony eBook! 11 Chapters on DEPLOYMENT, COST SAVINGS, SECURITY & more.
SOLVE SUPPORT ISSUES on the First Call!
REMOTELY CONTROL AND CONFIGURE SYSTEMS. Easily install applications, updates. All from your Desktop!
IMPROVE YOUR SUPPORT EFFICIENCY
WebEx lets you remotely control, configure and install applications and updates more efficiently.
» Buy a link now

Advertisements
Sponsored links
Locate Hidden Software on business PCs with this free tool
KODAK i1400 Series Scanners stand up to the challenge
Top 5 Reasons to Combine App Performance and Security
Bring harmony to your mix of UNIX-Linux-Windows computing environments
 Home   Application Development  Programming tools  Compilers
www.itworld.com    open.itworld.com     security.itworld.com     smallbusiness.itworld.com
storage.itworld.com     utilitycomputing.itworld.com     wireless.itworld.com

 
Contact Us   About Us   Privacy Policy    Terms of Service   Reprints  

CIO   Computerworld   CSO   GamePro   Games.net   IDG Connect   IDG World Expo   Industry Standard   Infoworld   ITworld   JavaWorld   LinuxWorld  MacUser   Macworld   Network World   PC World   Playlist  

Copyright © Computerworld, Inc. All rights reserved

Reproduction in whole or in part in any form or medium without express written permission of Computerworld Inc. is prohibited. Computerworld and Computerworld.com and the respective logos are trademarks of International Data Group Inc.