Performance untyped calling

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
User avatar
Posts: 386
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

Performance untyped calling

Post by ArneOrtlinghaus »

In the last months I have used the testing time also for running performance analisis using the nice program "Telerik Just Trace" that isn't sold anymore.
I have strong typed many functions and methods and I could improve the performance much although I cannot give any absolute values.
I have got the following impression regarding efficiency:
Using Usuals, symbols, arrays is not a really visible performance criterion. Often strings (the dotnet strings!) with more than a few hundred characters are worse.
Late bound calling should be avoided where possible and called often, but is not always visible.
Most performance results can be achieved not having any clipper calling conventions (variable number of arguments). In this case both, early bound calls and late bound calls using reflection seem to suffer under having to store all arguments into a temporary array, then calling the method and the method has to extract every parameter from the temporary array.

So the compiler switch "Implicit clipper calling convention" which is currently set in our projects seems to play an important role.
Is it right that switching off this parameter needs declaring all functions/methods like "Nomethod" with variable list of arguments as clipper? But doing this could give a good kick of performance?

User avatar
Posts: 4593
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Performance untyped calling

Post by Chris »

Hi Arne.

The "Implicit clipper calling convention" option takes care of those two situations:


In those cases, the compiler does not know if you intended the methods to be declared as strongly typed ones, or with clipper calling convention, so you actually do have a variable number of parameters, even though none is actually mentioned in the method declaration, as in VO.

For compatibility with VO code, this compiler option should be on, making all such methods CLIPPER. For new code, which uses strongly typed code only, it is recommended to keep this option off.

Of course you can also specify yourself what a (parameterless) method should be declared as, by manually applying the CLIPPER or STRICT/PASCAL clause:


Chris Pyrgas

XSharp Development Team test
Post Reply