|
|
|
|
|
|
| ACDK Types | Constructs | Metainfo | DMI | Memory | Performance |
There are several regards of performance of ACDK program.
ACDK is designed to provide many features, which makes development
more easy. Some of this features also costs performance.
This chapters should help you to implement fast ACDK programs.
A distributed ACDK application should organized in following layers:
- External Interfaces for distributed computing and scripting.
These interfaces are normally connected with the most overhead.
- Internal Interfaces for meta features like serialization, memory management.
- Internal Implementation.
Avoid using acdk::util::Vector and acdk::util::Hashtable.
The classes acdk::util::ArrayList and acdk::util::HashMap has the same functionality
but are internally not synchronized. If the Container instances are only
used in one thread, synchronization is not neccessary, but has nagative
impact on the performance.
In ACDK you can allocate the variable not only via new operator (like in Java and C#)
but also allocate the objects on the stack.
Please refert to Stack.
ACDK base mechanism to make garbage collection is using reference counting.
To safe unneeded reference counts, you may use stack variable if appropriate (see Stack).
Another issue is passing object variables to functions:
void foo(RString str)
{
}
RString s = "asdf";
foo(s); // do increment and decrement the reference count
|
If you use the IN() argument attribute the passed reference
doesn't do increment/decrement reference count:
void foo(IN(RString) str)
{
}
RString s = "asdf";
foo(s); // do NOT increment and decrement the reference count
|
Please refer to Stack and String to improve string performance.
Different to Java or C# in ACDK you can use explicetally inline methods.
The inlined methods are of course usefull if you have very short methods.
|
|