|
-
Jan 7th, 2005, 06:13 AM
#1
Thread Starter
Frenzied Member
project properties
Hello
I was looking at the Project Properties.
Where does the Version number get stored in the final code?
Also in the compile process, what is the difference between
compile to P-Code &
Compile to Native-code
Last edited by vb_student; Jan 7th, 2005 at 09:43 AM.
-
Jan 7th, 2005, 06:40 AM
#2
Re: project properties
The version number will not be stored in code.
It is stored in the *.vbp file, and if you make an executable, it will get this version number as well. Where the version number is actually stored in the executable I don't know, but you can see it in the properties dialog of the executable.
The difference between P-code and native code is as follows:
P-code: this is the old compile method of VB (pre vb5). It compiles the code to pseudo code, and it will result in a slightly slower executable then native code. Compiling an executable needs less computer resources, so if you have problems compiling a big project to native code, you can choose between using a computer with more memory or to compile using p-code.
Native code: I believe this is introduced in VB5, and it compiles to code that is closer to the language a processor understands. Mostly it produces faster executables then p-code, but it needs more computer resources to compile.
In general this is the recommended option to use, only if you have problems creating an executable this way (with big projects and older computers), you should switch to p-code.
-
Jan 7th, 2005, 06:50 AM
#3
Thread Starter
Frenzied Member
Re: project properties
thanks for the reply
do you mean to say that if we compile the code into native code, the program will run faster?
what i mean to ask is
say if we have a number crunching operation some where in the code, which took say 3 minutes when compiled in p-code, would it take say 2 minutes when compiled in native code?
-
Jan 7th, 2005, 08:00 AM
#4
Re: project properties
p-code is an interpreted language. During runtime the code is translated into instructions for the processor. With native code, this translation is already done during compilation.
p-code should be slower, but depending on the program, the performance differance may not be noticeable.
With processor intensive tasks you can notice a difference, but i don't think it will reduce 3 minutes to 2 minutes.
In most applications, the wait time is often caused by other factors, like waiting for a recordset to be returned, or for reading or writing to disk.
In these situations, there will be no noticeable performance benefit.
-
Jan 7th, 2005, 08:12 AM
#5
Re: project properties
Look at the .VBP and the .FRM files in your project with NOTEPAD - that will help remove some of the mystery behind them.
-
Jan 7th, 2005, 09:43 AM
#6
Thread Starter
Frenzied Member
Re: project properties
thanks again
you guys have cleared so many of my concepts in so short a time
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|