Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#ActualBacterius

Posted 01 May 2013 - 09:28 PM

Do you mean to say that an interpreted language such as some script is faster than a compiled language such as C++?

 

It's a known fact that the more information you give to a compiler or interpreter, the easier it will be for it to optimize your code. Low-level code is thus quite hard to optimize, whereas high-level code has it a bit easier because the compiler/interpreter can make better guesses as to what the code is doing at a high level and apply more specific optimizations whereas low-level compilers can only make generic attempts at optimizing the code. But this doesn't really apply to scripting languages because they are not built for performance.

 

What I think he meant is that for scripting languages, you don't need to recompile your entire game or program every time you change one tiny thing, which makes scripting languages ideal when you need to prototype something quickly. Do you really want to wait 5-10 (or more) minutes each time you tweak a constant or some formula to get the effect you want? With scripting languages, you don't have to smile.png Of course partial compilation (with object files) makes compiling C++ code faster, but it's still pretty slow overall (and if you change a header.. ouch..)


#1Bacterius

Posted 01 May 2013 - 09:27 PM

Do you mean to say that an interpreted language such as some script is faster than a compiled language such as C++?

 

It's a known fact that the more information you give to a compiler or interpreter, the easier it will be for it to optimize your code. Low-level code is thus quite hard to optimize, whereas high-level code has it a bit easier because the compiler/interpreter can make better guesses as to what the code is doing at a high level and apply more specific optimizations whereas low-level compilers can only make generic attempts at optimizing the code. But this doesn't really apply to scripting languages because they are not built for performance.

 

What I think he meant is that for scripting languages, you don't need to recompile your entire game or program every time you change one tiny thing, which makes scripting languages ideal when you need to prototype something quickly. Do you really want to wait 5-10 (or more) minutes each time you tweak a constant or some formula to get the effect you want? With scripting languages, you don't have to :)


PARTNERS