(sorry for my terrible written english)
I'm porting a software from Microsoft Basic 7.1 PDS to PowerBasic 3.5 DOS.
With just some modification to the code, things are working pretty well. But, I have a performance issue: I found the PB compiled program running slower thant the MS version!
After a little investigation, it seems to me that working with integer arrays it's not so fast with PowerBasic.
An example:
On a P3/550Mhz, under WinXP, the times are:
MS Basic: 0.8 Sec.
PB: 4.61 Sec.
Using LONG instead of INTEGER (DEFINT -> DEFLNG):
Ms Basic: 10.10 Sec.
PB: 10.21 Sec.
I enable 386 code generation, disabled all errors testing, disabled CTRL-Break checking, etc.
I'm doing something wrong? Why a so big difference with integers?
Thx for any info,
Bye!
------------------
May the Force be with you!
I'm porting a software from Microsoft Basic 7.1 PDS to PowerBasic 3.5 DOS.
With just some modification to the code, things are working pretty well. But, I have a performance issue: I found the PB compiled program running slower thant the MS version!
After a little investigation, it seems to me that working with integer arrays it's not so fast with PowerBasic.
An example:
Code:
DEFINT A-Z DIM a(1000) DIM b(10000) t! = TIMER FOR r = 1 TO 5 PRINT r FOR i = 1 TO 1000 c = 0 FOR j = 1 TO 10000 c = c + 1 a(i) = c b(j) = a(i) NEXT j NEXT i NEXT r tt! = TIMER PRINT tt! - t!
MS Basic: 0.8 Sec.
PB: 4.61 Sec.
Using LONG instead of INTEGER (DEFINT -> DEFLNG):
Ms Basic: 10.10 Sec.
PB: 10.21 Sec.
I enable 386 code generation, disabled all errors testing, disabled CTRL-Break checking, etc.
I'm doing something wrong? Why a so big difference with integers?
Thx for any info,
Bye!
------------------
May the Force be with you!
Comment