Very Fast Compiling
Very Fast Compiling
Hi there!
A Feature of PureBasic is, that
"PB is able to compile more than 300.000 Codes per minute on a P200"
My Question is, how I can check this out? There is any proof or something else? What Code is this?
A Feature of PureBasic is, that
"PB is able to compile more than 300.000 Codes per minute on a P200"
My Question is, how I can check this out? There is any proof or something else? What Code is this?
PB 4 | WinXP_SP2
Not bad on my notebook(P4 2.4ghz) 2,34 seconds
Code: Select all
#Iteration=100000
OpenConsole()
PrintN("Creating testfile")
T1=ElapsedMilliseconds()
CreateFile(1,#PB_Compiler_Home+"\Compilers\testme.pb")
WriteStringN(1,"Messagerequester(" + Chr(34)+"info"+Chr(34)+","+Chr(34)+"Dummy of the day"+Chr(34)+",0):End")
M=#Iteration/3
For I=1 To M
WriteStringN(1,"For t=0 to 1000")
WriteStringN(1," P=42")
WriteStringN(1,"Next")
Next
CloseFile(1)
T2=ElapsedMilliseconds()
PrintN(" created file with "+Str(#Iteration)+" lines in "+StrF((t2-t1)/1000,3)+" secs")
PrintN(" now compiling testfile.....")
T1=ElapsedMilliseconds()
r=RunProgram(#PB_Compiler_Home+"\Compilers\pbcompiler",#PB_Compiler_Home+"\Compilers\testme.pb /exe testme.exe","",#PB_Program_Wait)
T2=ElapsedMilliseconds()
PrintN("time To Compile "+Str(#Iteration)+" lines is "+StrF((t2-t1)/1000,3)+" secs")
t.s=Input()
DeleteFile(#PB_Compiler_Home+"\Compilers\testme.pb")
DeleteFile(#PB_Compiler_Home+"\Compilers\testme.exe")
CloseConsole()
End
SPAMINATOR NR.1
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Rings , the tip you have wrote is buggy! It doesn't work here.
A functional version:
By the way i got more than 5 secs in a AMD64 3000+, but with NOD32 antivirus...
A functional version:
Code: Select all
#Iteration=100000
OpenConsole()
PrintN("Creating testfile")
T1=ElapsedMilliseconds()
CreateFile(1,#PB_Compiler_Home+"Compilers\testme.pb")
WriteStringN(1,"Messagerequester(" + Chr(34)+"info"+Chr(34)+","+Chr(34)+"Dummy of the day"+Chr(34)+",0):End")
M=#Iteration/3
For I=1 To M
WriteStringN(1,"For t=0 to 1000")
WriteStringN(1," P=42")
WriteStringN(1,"Next")
Next
CloseFile(1)
T2=ElapsedMilliseconds()
PrintN(" created file with "+Str(#Iteration)+" lines in "+StrF((t2-t1)/1000,3)+" secs")
PrintN(" now compiling testfile.....")
T1=ElapsedMilliseconds()
r=RunProgram(#PB_Compiler_Home+"Compilers\pbcompiler",Chr(34)+#PB_Compiler_Home+"Compilers\testme.pb"+Chr(34)+" /exe testme.exe","",#PB_Program_Wait)
T2=ElapsedMilliseconds()
PrintN("time To Compile "+Str(#Iteration)+" lines is "+StrF((t2-t1)/1000,3)+" secs")
t.s=Input()
DeleteFile(#PB_Compiler_Home+"Compilers\testme.pb")
DeleteFile(#PB_Compiler_Home+"Compilers\testme.exe")
CloseConsole()
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact: