Source language: Translate to:

Perhaps NeoBook needs steroids....

Questions or information that don't quite fit anywhere else

Moderator: Neosoft Support

Perhaps NeoBook needs steroids....

Postby David de Argentina » Sat Mar 07, 2009 12:29 am

Hi all,

I did the same test on several languajes in order to know perfomances.

the Neobook Script is the following:

Code: Select all
setvar "[x]" "1"
setvar "[y]" "1.0000001"
TimerStart "Cronometro1" "5000"

Loop "1" "100000000" "[i]"
  math "[x]*[y]" "-1" "[x]"
endloop

TimerStop "Cronometro1"

. [timer] is the variable to get the interval of the Timer Object
alertbox "" "[timer]"


Visual Basic 6 do the test in 3.469 secs.
Powerbasic do the test in 0.206 secs.
NeoBook ... after 2 minutes with the CPU at 100%... I decided cancel the test...

Are there a good pharmacy near Oregon ? :lol:

Greetings from Buenos Aires,
David de Argentina
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby HPW » Sat Mar 07, 2009 12:38 am

Is it fair to compare interpreted vs. compiled?
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby David de Argentina » Sat Mar 07, 2009 12:45 am

Hi Hans-Peter,

No, compiled vs compiled.

X and Y variables are defined as Floating-Point extended presition
Timer is Floating-Point single presition
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby David de Argentina » Sat Mar 07, 2009 12:52 am

Sample is based on this article:

http://www.powerbasic.com/products/pbdll32/

I think there is interesting know how about this test using Delphi

Greetings from Buenos Aires,
David de Argentina
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby HPW » Sat Mar 07, 2009 3:17 am

No, compiled vs compiled.


Nope. neobook is never compiled. It does not produce native mashine code.
The 'compile'-process bind the neobook runtime with the contained scripts amd the scripts gets feeded into the interpreter.
When you do not encrypt on 'compile' you can see the script with a hex-viewer.
So in fact neobook is not a real compiler (in the pure sense).

As always: Use the right tool to get the job done.

So neobook for GUI-Scripting and others via plugins for number-crunching.
Last edited by HPW on Sat Mar 07, 2009 5:11 am, edited 4 times in total.
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby HPW » Sat Mar 07, 2009 4:21 am

I think there is interesting know how about this test using Delphi


Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
 var
    start,stop,time, I : integer;
    x,y  : Double;
begin
  x :=  1;
  y :=  1.0000001;
  start := GetTickCount;
  for I := 1 to 100000000 do
    BEGIN
     x := x * y ;
    END;
  stop := GetTickCount;
  time := stop-start;
  Label1.Caption := 'Needed time '+ IntToStr(time) + ' ms';
end;


Delphi 7/Win XP on a P4 1.8 GHZ: ~1750 ms
On a Vista Laptop Core 2 Duo P8400 2.26 GHZ: ~ 800 ms

PS: I know that PB produce fast code since I own a PB WIN for a long time now.
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Gaev » Sat Mar 07, 2009 7:02 am

David de Argentina:

That was a good academic exercise ... but here are some considerations when selecting a "the right tool for the job" (copyright HPW :wink: ) ...

1) the Loop/EndLoop (and similar While/EndWhile) code blocks are the the only instances where I have found a noticeable (run time) response that is wanting in NeoBook ... and only with a significant number of iterations.

2) perhaps you can do a similar test ... only, instead of a math "[x]*[y]" "-1" "[x]" command inside the loop, do something that reads/writes files ... the differences should be less pronounced.

3) since most applications do not require perforing Prime Number or Factorial type calculations, the choice of "right tool" should include other considerations ... for me ...

- Rapid Application Development
- Ease of Development (and fun)
- Product with miniscule number of defects
- Prompt response from Dave when problems are encountered
- Ability to have direct input to future enhancements

... all trump the one or two instances where other tools out perform NeoBook.


Comparing PowerBasic and Delphi ... 100 million iterations in 200 milliseconds vs. 800 milliseconds ... proves the point that for 99.999% of Desktop Applications, speed of execution is no longer an issue/consideration ... even Intel stopped pouring money into faster processors ... and focused on multi-core architectures instead.

Its like comparing 2 sports cars ... one can travel at 300 km/hour and another at 600 km/hour ... but if you use your car to travel within a large city (maximum speed 100 km/hour), all you get with a faster rated car is "bragging rights" ... I would rather have a less expensive car that is safe, comfortable and reliable.
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to Misc. Questions and Information

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest