[Top] [Prev] [TOC] [Next] [Bottom]

Tuning the TargetRTS


This section briefly describes areas in the TargetRTS that can be tuned to improve performance. The Performance update described in "Performance update" on page 95 can be used to verify the success of performance enhancements.

Disabling TargetRTS features for performance

The TargetRTS can be modified to exclude many of its features to provide a minimum high performance feature set. The section "TargetRTS Customization Example" in the C++ Target Guide describes how to create such a version of the TargetRTS. For C Language usage, please refer to "Recommended Configurations" on page 213 in the C Language Guide for suggested optimizations. The so-called "minimum TargetRTS" disables the external layer (and target observability), logging service and the RTS debugger. The minimum TargetRTS should provide significant performance gains over the fully featured version.

Target compiler optimizations

Most compilers provide optimizations at the code generation stage that can produce faster running code. In general, if your compiler supports such optimizations, they should be used. Be sure to remove all debug options at the same time since they may cancel out certain or all optimizations. Some optimizations may come at the cost of code size. If application code size is a factor for your target then the benefit of optimization versus code size will have to analyzed. Many compilers may have different levels of optimization, which may produce differing degrees of code size and performance enhancements. It is hard to predict the outcome of such optimizations in C++. Using the Performance update may prove useful. See "Performance update" on page 95. For C usage, please refer to "Compliance Suite & Examples" on page 219 of the C Language Guide.

Optimizations can cause errors in the running application that were not present before optimizations were enabled. Be sure to fully test the TargetRTS after enabling any optimizations.

Target operating system optimizations

The Target operating system may provide optimizations. For example, it may be possible to link in a non-debug version of the OS with the application. These optimizations are specific to each RTOS. Refer to the documentation for your specific RTOS.

Specific TargetRTS performance enhancements

In C++, one key area that can improve performance in the TargetRTS is in inter-thread message passing. The TargetRTS make use of two synchronization mechanisms for much of its message passing, namely, the RTMutex and RTSyncObject class. Some operating systems provide heavy-weight and light-weight synchronization mechanisms. The light-weight version has less features but higher performance; whereas, the heavy-weight version may have more features but poorer performance. Your choice of implementation for the RTMutex and RTSyncObject may affect the performance of inter-thread message passing, so be sure to investigate and determine the lightest-weight mechanism necessary to satisfy the requirements of these classes.



[Top] [Prev] [TOC] [Next] [Bottom]

support@objectime.com
Copyright © 1998, ObjecTime Limited. All rights reserved.