Advertisement

Native vs Generic calling conventions performance?

Started by September 02, 2012 09:50 AM
2 comments, last by WitchLord 12 years, 3 months ago
Hi,
Just wondering if anyone has some measurements about the difference between using native or generic calling conventions on different platforms?
I'm in the phase of porting my engine to as many platforms as I can. Some of them like the Android MIPS or the Windows Runtime ARM are working only with generic (the code itself can be compiled on any platforms to use generic) and I'm really curious if the difference is significant or not so much, so I can use generic in the final code.
The generic calling convention should be fast enough on all platforms, so if you want to use only that then it should be just fine. Whether it is faster or not than the native calling convention depends on a lot of factors.

On some platforms the native calling convention is so complex that AngelScript has to do a lot of runtime checks in order to prepare the function call properly for the application, which can very well turn the native calling convention slower than the generic calling convention. But even on those platforms depending on the actual function being called the native calling convention may be faster, if the arguments are simple enough.

If you encounter any performance issues on any platform it would be great if you could provide some profiling information, so I can take a look at it and try to find suitable optimizations.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement
My engine is a 2D full game making solution with AS sitting in it's heart. Basically there is going to be a free license where the engine source is not provided, but a dynamic library can be downloaded. In this version the game makers can use AS to write game code. Basically all engine functionality is delegated to AS and I'm measuring the time spent in the scripting system.

The proof of concept game is now shaping up based on the engine, proving that a full fledged game can be made by using only scripting without touching the engine code. The good news that there is no slowdowns in AS so far, but I'll provide you cases when they are showing up.
Sounds interesting. I look forward to seeing more of this in the future.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement