Best Language For Number Crunching

I've been programming in QuickBasic so far which is very slow - I've been told. What programming language - C#, C++, Java, VB, PowerBasic, Python, Etc would be the fastest for programming Console applications? I wouldn't be trying graphics or anything, just crunching numbers. Please don't answer with ASM, because I don't want to learn that as my next language.


Comments

  • I recently did a comparison of several major compilers / languages, running a matrix solver. This isn't entirely scientific, although I did run them all on the same machine, etc. The run times, in terms of seconds were:

    2.5 Fortran 77
    2.9 .NET C++
    3.7 Java 2SE, 5.0 Beta 2
    4.7 Turbo Pascal 7.0
    5.3 VB .NET 1.1
    6.4 VB 2003 .NET
    6.6 Delphi 8.0 (.NET)
    7.1 VB 6.0

    The lower the number, the better. I'd suggest some type of Fortran.


  • : I recently did a comparison of several major compilers / languages, running a matrix solver. This isn't entirely scientific, although I did run them all on the same machine, etc. The run times, in terms of seconds were:
    :
    : 2.5 Fortran 77
    : 2.9 .NET C++
    : 3.7 Java 2SE, 5.0 Beta 2
    : 4.7 Turbo Pascal 7.0
    : 5.3 VB .NET 1.1
    : 6.4 VB 2003 .NET
    : 6.6 Delphi 8.0 (.NET)
    : 7.1 VB 6.0
    :
    : The lower the number, the better. I'd suggest some type of Fortran.
    :
    If you would add some "normal" C/C++ (I suggest C), you would have the same results with "1.9 C" and "2.1 C++".
    The entire .NET framework is made for optimalizing code on targe machines, but because of some strange things, .NET is sometimes slower.

    The C language is faster than C++ so if you want realy good results, use C on a single threaded system (like DOS32).
  • : I've been programming in QuickBasic so far which is very slow - I've been told. What programming language - C#, C++, Java, VB, PowerBasic, Python, Etc would be the fastest for programming Console applications? I wouldn't be trying graphics or anything, just crunching numbers. Please don't answer with ASM, because I don't want to learn that as my next language.
    :
    :
    :

    From my past experience C or C++ will give you the best speed! With BCX you can write your program in simple basic and have it translated to C. Best of all BCX is a free basic to C translator. It will be the C code that is compiled. Don't worry, you don't have to get involved with C, even so it will be good for you!

    Write your basic code on the included editor and compile and run it from the editor. This program has excellent help files and a good selection of examples. You can look at the C code it produces. You can make win-gui or console programs. Console programs have a very small size and can be optimized for speed!

    The whole package (free) can be downloaded, including the free Pelles-C compiler, from:

    http://www.rjpcomputing.com/programming/bcx/

    You don't need the additional Context editor or the win api help files to start out.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories