Page 1 of 2

Very Fast Compiling

Posted: Sat May 20, 2006 11:45 am
by PureBaser
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?

Posted: Sat May 20, 2006 4:06 pm
by GedB
First you'll need 300,000 lines of code.

Then you'll need a p200.

Good luck with that.

On my 1ghz ageing desktop Japbe, which is massive, compiles in a couple of seconds.

Posted: Sat May 20, 2006 5:00 pm
by traumatic
GedB wrote:First you'll need 300,000 lines of code.

Then you'll need a p200.

Good luck with that.
ROFL

Posted: Sat May 20, 2006 8:33 pm
by PureBaser
The Code you can surely generate. And I have a P450. So I expect about 500.000 Code per minute...

Posted: Sun May 21, 2006 4:06 am
by Dare2
GedB wrote:First you'll need 300,000 lines of code.

Then you'll need a p200.
:D

@PureBaser - Did you get your 500kpm?

Posted: Sun May 21, 2006 3:27 pm
by PureBaser
Not really... To Be honest, I've not enough time to write a few lines :wink:

Posted: Mon May 22, 2006 3:46 pm
by Rings
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 

Posted: Mon May 22, 2006 4:24 pm
by Psychophanta
Rings , the tip you have wrote is buggy! It doesn't work here.

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()
By the way i got more than 5 secs in a AMD64 3000+, but with NOD32 antivirus...

Posted: Mon May 22, 2006 5:23 pm
by PureBaser
6,94s on my PIII 900. The 450 will follow....

Posted: Mon May 22, 2006 5:46 pm
by netmaestro
Psychopanta, I've got a nearly identical system to yours and the example compiles in 1.64 seconds.

Posted: Mon May 22, 2006 6:12 pm
by Psychophanta
netmaestro wrote:Psychopanta, I've got a nearly identical system to yours and the example compiles in 1.64 seconds.
Do you have NOD32 and ZoneAlarm pro running?

Posted: Mon May 22, 2006 6:43 pm
by netmaestro
No, but I have VistaClock running sticky. That speeds up processing time for all applications by 300% :lol:

Posted: Mon May 22, 2006 7:54 pm
by Fred
BTW, these numbers are very old and will be removed from the page as it makes no sens anymore.

Posted: Mon May 22, 2006 8:36 pm
by Psychophanta
what numbers?

Posted: Mon May 22, 2006 9:01 pm
by Flype
Psychophanta wrote:what numbers?
these ones :
"PB is able to compile more than 300.000 Codes per minute on a P200"
:wink: