|
Post by BillSturm on Jan 31, 2008 20:48:11 GMT -5
Based on LB, it would guess that it is. At least to byte code.
|
|
|
Post by carlgundel on Jan 31, 2008 22:07:59 GMT -5
Run BASIC is compiled to a structure of excutable objects and bytecodes. It is not an interpreter, and even the virtual machine is not an interpreter but instead it uses a just-in-time native code compiler.
This is similar to the way that LB4 is compiled but we built a new compiler from scratch, and the executable model is new and more powerful and faster than the one in LB4.
-Carl
|
|
|
Post by Psycho on Feb 2, 2008 10:12:34 GMT -5
This is similar to the way that LB4 is compiled but we built a new compiler from scratch, and the executable model is new and more powerful and faster than the one in LB4. -Carl This simple test showed that Run basic is indeed substantially faster. At least at simple counting routines. The following code took 18 seconds to run on my machine in LB4 and only 5 seconds in Run Basic. Nice print "starting...";time$() for x = 1 to 5000000 next x print "Done.... ";time$() end
|
|
|
Post by ekvirtanen on Feb 16, 2008 19:04:21 GMT -5
I am actually shocked about that 18 seconds with LB4. Since i am not aware of hardware youre using, could you please reply with timing feedback of next code here with rB and LB4? print "starting...";time$() for x = 1 to 5000000 temp$ = str$(x) if len(temp$) > 5 then temp$ = "" end if next x print "Done.... ";time$() end
Code you posted took in my computer timings like this. yaBasic 3.03 seconds. ChipMunkBasic: Less than 1 second FreeBASIC: less than 0.01 seconds QB under dosbox: 1.8 seconds rB under wine: 0.12 seconds Naturally, we cant give much value for results under wine. What i am after here is that how LB4 can take so long with this code? My hardware CPU: 1.8 64Bit dual core amd 1 gig ram Ubuntu Linux (ok, lot's of "tuned" for speed by me and some gurus )
|
|
|
Post by carlgundel on Feb 16, 2008 22:19:47 GMT -5
It doesn't seem likely to me that Run BASIC executes that code on your hardware in 0.12 seconds. 1.2 seconds seems more realistic, or 12 seconds if you don't have a newer computer. Run BASIC is no speed demon unless you compare it to Liberty BASIC. Liberty BASIC and Run BASIC are both built on top of dynamic object oriented technologies. They are optimized for flexibility, not for speed. Run BASIC is faster than Liberty BASIC 4 because it leverages a newer Smalltalk language platform, and because we redesigned it to be faster then LB. We haven't even had a chance to sit down and do any real performance optimization so I hope that Run BASIC will ultimately be significantly faster than it already is. Liberty BASIC v5.0 and Run BASIC share a common codebase, so LB5 will be faster than LB4 too. Of course Run BASIC also leverages a very powerful web framework, so that's another reason why it is built using Smalltalk since that framework only exists for Smalltalk. Speed can be important, but only for certain kinds of applications. So what are the relevant questions? -What can Run BASIC do for me that other BASICs cannot? -Is Run BASIC fast enough for what I need to do? The answer will usually be yes. Then use the right tool for the job. -Carl
|
|
|
Post by ekvirtanen on Feb 17, 2008 3:41:32 GMT -5
Hi Carl.
Youre right. i retested this morning and for some reason, i got different results with every basic dialect i did test. rb 10:32:46 - 10:32:54 = 8 seconds.
Anyway, this is a bit offtopic but i was just amazed of the results by PSycho.
|
|
|
Post by Psycho on Feb 17, 2008 12:24:01 GMT -5
ekvirtanen, your code operating on my PC:
print "starting...";time$() for x = 1 to 5000000 temp$ = str$(x) if len(temp$) > 5 then temp$ = "" end if next x print "Done.... ";time$() end
Produced the following results:
In LB4: starting...12:15:09 Done.... 12:16:24 for a total of 1:15
In RB: starting...12:20:18 Done.... 12:20:38 for a total of 0:20
This is on a 3.2 Ghz P4, Intel MB, 2GB PC3200 RAM
I run LB4 and RB more often on my AMD Opteron 165 dual core at 1.8 Ghz and 2GB of PC3500 RAM. On that machine, these same tests took 1:17 and 0:25 respectively
|
|