Thread: Recommended Method of Creating Games

  1. #16
    Deleting... VOX's Avatar
    Join Date
    Oct 2004
    Why is .NET slower anyway? I mean, what makes C++ faster than C#?
    Boy you stink, go take a shower before you continue to code. Better do your laundry and spray your chair too.

    The one and only resource for finding information.

    Next version of windows released!!!!

  2. #17
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Outer Space!
    And why is visual basic .net syntax different from vb6 (i know it's an off-topic question.. but speaking about .net...)
    what does signature stand for?

  3. #18
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    ... Okay, let me smack into shape.

    First off, .NET and C#.

    .NET is slow because it is, in fact, an Object-Oriented psuedo language much like Java. Java is run through the JVM, which interprets ByteCode. ByteCode isn't machine code, or Opcodes. Bytecode is a special format that is interpreted by a Virtual Machine such as the JVM. The JVM takes the bytecode and translates it into Opcodes, which theoretically is what makes Java work *everywhere.* The Bytecode isn't platform and architecture dependent like Assembly or Win32 code. The JVM interprets it accordingly.

    .NET is compiled into CIL I believe, which is just interpreted to the computer by the CLR. .NET works by doing JiT compilation or Just-in-Time compilation. The ideology behind JiT is `hunks' of bytecode are thrown into the interpreter/VM at a time and THEN translated into opcodes to feed. This way, the program is throw into opcodes as it is run.

    The reason frameworks like .NET and The JDK are slow is because it takes a signifincatly larger amount of time to translate these pieces. In fact, I also bet that when the VM interprets .NET or JDK code, it probably produces and feeds the CPU badly made Opcodes as well.

    That's the same reason languages like C++ are slower than their brother C. C++ is Object-oriented, therefore when it's compiled it comes out to more opcodes to accomodate the language, so it takes longer for the CPU to run them. That's why a C++ app that's big will take a long time to execute and lag sometimes.

    This is also the reason, why Assembly is so damn fast, you control every step of how the computer mov's (bad joke) and thus it is compiled into the smallest, fastest and most lean opcodes.

    This also, brings us to VB.NET and VB6.

    As I mentioned earlier, .NET is object oriented. Therefore all the languages of .NET inherit this (another bad joke.) VB6 and VB.NET are built off totally different frameworks, one is Object-Oriented and one is not.

    Hence why in a procedural language like C you would do strlen(string); but in VB.NET you might do string.Length(); because in that sense the string variable is not a variable, but an object to a string class with it's own methods and data.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Overriding a method in C
    By DavidDobson in forum C Programming
    Replies: 1
    Last Post: 07-05-2008, 07:51 AM
  2. Violent video games?
    By VirtualAce in forum A Brief History of
    Replies: 58
    Last Post: 04-26-2006, 01:43 PM
  3. Hooked on old games...... still
    By Stoned_Coder in forum A Brief History of
    Replies: 18
    Last Post: 05-30-2005, 02:46 PM
  4. Creating utilities for games.
    By RealityFusion in forum Game Programming
    Replies: 6
    Last Post: 04-12-2004, 07:31 AM
  5. Replies: 3
    Last Post: 12-03-2001, 01:45 PM