Dummie question: compiled language or not?
-
Sorry for bothering you with stupid sounding stuff from me newbie... During my first tries with VB 2008 Express I'm creating an application which calls a command line tool for image processing (in loops). From their support I received the hint "With so many images to process, performance will be dramatically improved if you can use a scripting language like PerlMagick, RMagick, TclMagick, or a compiled language like C/C++." I had thought that VB 2008 Express IS a compiled language. Is that wrong? Coming from VBA and VB Script I have some background with the VB syntax etc, that's why I chose to enhance that to VB 2008 rather than beginning with C for my simple (private) purposes. Thanks for bringing some light to my darkness :suss:
-
Sorry for bothering you with stupid sounding stuff from me newbie... During my first tries with VB 2008 Express I'm creating an application which calls a command line tool for image processing (in loops). From their support I received the hint "With so many images to process, performance will be dramatically improved if you can use a scripting language like PerlMagick, RMagick, TclMagick, or a compiled language like C/C++." I had thought that VB 2008 Express IS a compiled language. Is that wrong? Coming from VBA and VB Script I have some background with the VB syntax etc, that's why I chose to enhance that to VB 2008 rather than beginning with C for my simple (private) purposes. Thanks for bringing some light to my darkness :suss:
VB.Net compiles to MSIL (Microsoft Intermediate Language), and then you deploy that file (.exe) to your clients. Your clients must have the .NET Framework which includes the JIT (Just In Time) Compiler. The JIT then interprets your MSIL and executes the commands. In short, it compiles, but not to native code such as C++/C. It compiles to MSIL. There are downsides to this, and upsides to this. Obviously, one of the bigger advantages is the fear of garbage collecting is gone when using a managed language, also the gigantic framework at your fingertips allowing you to develop applications at a great speed with (hopefully) little ease difficulty lol. Hope that helps.
-
Sorry for bothering you with stupid sounding stuff from me newbie... During my first tries with VB 2008 Express I'm creating an application which calls a command line tool for image processing (in loops). From their support I received the hint "With so many images to process, performance will be dramatically improved if you can use a scripting language like PerlMagick, RMagick, TclMagick, or a compiled language like C/C++." I had thought that VB 2008 Express IS a compiled language. Is that wrong? Coming from VBA and VB Script I have some background with the VB syntax etc, that's why I chose to enhance that to VB 2008 rather than beginning with C for my simple (private) purposes. Thanks for bringing some light to my darkness :suss:
Here's one quite good link. Hopefully it explain what the compiler actually does. http://channel8.msdn.com/Posts/MSIL-the-language-of-the-CLR-Part-1/[^]
The need to optimize rises from a bad design.My articles[^]
-
VB.Net compiles to MSIL (Microsoft Intermediate Language), and then you deploy that file (.exe) to your clients. Your clients must have the .NET Framework which includes the JIT (Just In Time) Compiler. The JIT then interprets your MSIL and executes the commands. In short, it compiles, but not to native code such as C++/C. It compiles to MSIL. There are downsides to this, and upsides to this. Obviously, one of the bigger advantages is the fear of garbage collecting is gone when using a managed language, also the gigantic framework at your fingertips allowing you to develop applications at a great speed with (hopefully) little ease difficulty lol. Hope that helps.
EliottA wrote:
The JIT then interprets your MSIL and executes the commands.
No, it doesn't. The JIT compiles the MSIL code down to processor-specific native machine code. So, yes, VB.NET is a compiled language, just like C# or C++, ...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Here's one quite good link. Hopefully it explain what the compiler actually does. http://channel8.msdn.com/Posts/MSIL-the-language-of-the-CLR-Part-1/[^]
The need to optimize rises from a bad design.My articles[^]
Thank you both... although after reading the article I have to admit that the issue yet seems to be completely beyond my understanding :doh: . Guess I'm better off living with the performance issue in the particular case - coz if I dive deeper into that kind of issues :confused::confused: I might have to give up my day job and my family. Have a nice evening and thanks still!
-
EliottA wrote:
The JIT then interprets your MSIL and executes the commands.
No, it doesn't. The JIT compiles the MSIL code down to processor-specific native machine code. So, yes, VB.NET is a compiled language, just like C# or C++, ...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Hey Dave, after having written my other answer I just read yours and my live makes sense again :laugh: God bless you! To be more serious: At least I humbly realized the big gap between a professional programmers (necessary?) approach and my limited skills - which are still good enough for enjoying it, and also for many programming tasks as long as I don't set myself too ambitious goals. Sincerely Michael
-
Thank you both... although after reading the article I have to admit that the issue yet seems to be completely beyond my understanding :doh: . Guess I'm better off living with the performance issue in the particular case - coz if I dive deeper into that kind of issues :confused::confused: I might have to give up my day job and my family. Have a nice evening and thanks still!
-
Sorry for bothering you with stupid sounding stuff from me newbie... During my first tries with VB 2008 Express I'm creating an application which calls a command line tool for image processing (in loops). From their support I received the hint "With so many images to process, performance will be dramatically improved if you can use a scripting language like PerlMagick, RMagick, TclMagick, or a compiled language like C/C++." I had thought that VB 2008 Express IS a compiled language. Is that wrong? Coming from VBA and VB Script I have some background with the VB syntax etc, that's why I chose to enhance that to VB 2008 rather than beginning with C for my simple (private) purposes. Thanks for bringing some light to my darkness :suss:
Hi, VB.NET is a compiled language, it is capable of offering adequate performance for normal jobs. Other languages, even interpreted ones, could be capable of the same as long as they have native libraries for the most challenging tasks. On the other hand a mediocre programmer will always be able to create a dog that performs terribly, whatever language he chooses. :)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
-
VB.Net compiles to MSIL (Microsoft Intermediate Language), and then you deploy that file (.exe) to your clients. Your clients must have the .NET Framework which includes the JIT (Just In Time) Compiler. The JIT then interprets your MSIL and executes the commands. In short, it compiles, but not to native code such as C++/C. It compiles to MSIL. There are downsides to this, and upsides to this. Obviously, one of the bigger advantages is the fear of garbage collecting is gone when using a managed language, also the gigantic framework at your fingertips allowing you to develop applications at a great speed with (hopefully) little ease difficulty lol. Hope that helps.
This reply is completely wrong. The intermediate language is compiled into executable code at run-time, it is not interpreted and executed line by line. One of the main benefits of JIT compiling is that the compiler can optimize the resulting machine code to take advantage of the features of the CPU and operating system installed in the end-user's machine.
-
If you're worried about the speed, you could use ngen[^] which compiles your application to processor specific code.
The need to optimize rises from a bad design.My articles[^]
Partially true. It doesn't speed up your code though. All NGEN does is precompile everything all at once instead of waiting for the JIT to do the same thing on-the-fly.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
This reply is completely wrong. The intermediate language is compiled into executable code at run-time, it is not interpreted and executed line by line. One of the main benefits of JIT compiling is that the compiler can optimize the resulting machine code to take advantage of the features of the CPU and operating system installed in the end-user's machine.
Little further clarification on what's been posted already for those not familiar with the topic. MSIL is compiled to native (machine) code at runtime to take advantage of varying CPUs and architecture types; however the JIT compiler does not compile the entire assembly at once - it is done at a method by method level. It is possible to pre-compile using NGEN. When a method is called, that method then gets compiled to native code (once per the lifetime of the assembly). If there are methods that are never called during the operation of the assembly, then they never get converted to native code. This is done to increase performance during startup and runtime of the assembly to avoid a massive hit during initial startup.
Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison