|
0 registered members (),
1,012
guests, and 8
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Comparing Speed: LiteC/C++ which is faster?(and using DLLs)
#339526
08/27/10 13:17
08/27/10 13:17
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
HI, Just a little question.
Which programm would run fatser? One compiled with litec or the one with C++?
And how about writting timeintense pieces(like pathfinding) With C++, coompile them to DLL and use them within Lite-c?
Greets Rackscha
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: Comparing Speed: LiteC/C++ which is faster?(and using DLLs)
[Re: Rackscha]
#339529
08/27/10 13:48
08/27/10 13:48
|
Joined: Oct 2007
Posts: 5,209 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
|
i guess it's c++ > DLL > Lite-c
dll/lite-c would be less noticable but C++ is definately faster.
3333333333
|
|
|
Re: Comparing Speed: LiteC/C++ which is faster?(and using DLLs)
[Re: Razoron]
#339549
08/27/10 16:31
08/27/10 16:31
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Well, if you compile with -O0, there shouldn't be so much differences between a native C++ and a Lite-C application (as long as you don't start the engine, that will decrease your performance!). However, with -03 the C++ application will be much faster and a dll compiled with -O3 will be also faster than the same Lite-C application.
However, if you want to do some heavy calculations, it doesn't matter if you are doing this in Lite-C or C++. It will increase you performance a lot if you create a appropriate number of threads and let them do the calculation concurrently. If the calculation is based heavily on floating point operations you can also increase the performance by using the GPU rather than the CPU.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: Comparing Speed: LiteC/C++ which is faster?(and using DLLs)
[Re: WretchedSid]
#341226
09/13/10 14:01
09/13/10 14:01
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
Ah, thanks  Sp, maybe doing the same whole application in C++ might result in a better performance of calculations? (so, instead of doing snippets ouside of litec in c++, i could do a full c++ application, as far as i know its possible) PS: sorry for ligting this topic, but just forgot about it, and remembered it today Greets Rackscha
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
|