🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Scripting language performance

Started by
13 comments, last by drslush 21 years, 1 month ago
I''ve gotten it to about 300 times slower than native, so I don''t feel too bad. My scripting language is doing a ton of stuff dynamically, things that can only be done in a scripting language, so I think I''ll be happy with the fact that my language runs 3x slower than python. I''m not doing any super complex stuff with it, its just meant to be a scripting language for an RPG or some similar game.
Advertisement
quote: Original post by civguy
My quess is that they do it "the C++ way" and "the C way", not by compiling C code with a C++ compiler.
You don''t have to guess; you can see the source code used on the site.

How appropriate. You fight like a cow.
Xalon, read my post again. I don't want to bother explaining it more. Yes yes, I know that C code can be fed to C++ compiler. That was not the point.

[edited by - civguy on May 20, 2003 2:44:29 PM]
quote: Original post by Xalon
civguy, the test you do is compleatly unfair.
...
Also this above code does a LOT more than your two c lines.


It''s as unfair as that site comparing Python and C++. Python is doing a lot more than C++ is.

Also, I find it hard to believe that C++ compilers are better at optimizing C code than C compilers. C compilers have quite a few years on C++ compilers, not to mention that C++ compilers have a lot more to deal with. Also, C++ compilers require more hints in the code (like making you cast the return from malloc). Plus, the idea that you can just feed C code to a C++ compiler isn''t quite true. There are enough (relatively subtle) differences that this can fail (for example, the linking rules for inline functions are different in C and C++).
quote: Original post by Nypyren
Do some research into the System.CodeDom and System.CodeDom.Compiler namespaces that are part of the .NET framework.

Why bother writing your own OO scripting language when you can just use a real OO language compiled and invoked at runtime?

I''m using CSharpCodeProvider as a scripting language


That''s one cool idea! I''ll give it a try.

Regards,

Andre
Andre Loker | Personal blog on .NET

This topic is closed to new replies.

Advertisement