Author Topic: Tiny Benchmark Test  (Read 34690 times)

0 Members and 3 Guests are viewing this topic.

JRS

  • Guest
Re: Tiny Benchmark Test
« Reply #75 on: May 18, 2014, 02:22:55 PM »
Charles,

This is as creative as I can get with SB line number labels. Anything more needs the : style syntax.

Code: [Select]
0X40 FOR x = 1 TO 5
0X50   IF x = 3 THEN GOTO 0X10
0X20   PRINT x,"\n"
0X30 NEXT
0X10 END

Does this count?  8)

Code: [Select]
One:  FOR x = 1 TO 5
Two:    IF x = 3 THEN GOTO Five
Three:  PRINT x,"\n"
Four: NEXT
Five: END

Mike Lobanovsky

  • Guest
Re: Tiny Benchmark Test
« Reply #76 on: May 18, 2014, 02:38:13 PM »
John,

Does that work:

Code: [Select]
&H10 FOR x = 1 TO 5
&H20   IF x = 3 THEN GOTO &H50
&H30   PRINT x,"\n"
&H40 NEXT
&H50 END

That'd be supa-cool BASIC.

;D

JRS

  • Guest
Re: Tiny Benchmark Test
« Reply #77 on: May 18, 2014, 02:46:08 PM »
Yes.

Code: [Select]
&H10 FOR x = 1 TO 5
&H20   IF x = 3 THEN GOTO &H50
&H30   PRINT x,"\n"
&H40 NEXT
&H50 END

jrs@laptop:~/sb/sb22/test$ scriba linenumhex.sb
1
2
jrs@laptop:~/sb/sb22/test$

In Script BASIC numbers can use multiple formats and mixed with any other number format style. Remember, you (or someone else) may have to revisit the code.  :o

P.S. Don't you have SB installed?
« Last Edit: May 18, 2014, 03:30:00 PM by John »

Charles Pegge

  • Guest
Re: Tiny Benchmark Test
« Reply #78 on: May 18, 2014, 02:50:31 PM »
OxygenBasic is more relaxed about its line numbers. it will accept anything beginning with 0..9, being the first word in a statement. But it will not allow &h.  - nor negative numbers.

goto 0x100h.01.04..annex_B

0x100h.01.04..annex_B Print "line numbers in Basic Source code are hereby deprecated"

« Last Edit: May 18, 2014, 03:06:17 PM by Charles Pegge »

Mike Lobanovsky

  • Guest
Re: Tiny Benchmark Test
« Reply #79 on: May 18, 2014, 04:34:56 PM »
Remember, you (or someone else) may have to revisit the code. Don't you have SB installed?

LOL John,

Can't you see I'm simply trolling you (gently though) whenever I can? That's my little revenge for the past times of our yet-offline acquaintance.

;D

Mike Lobanovsky

  • Guest
Re: Tiny Benchmark Test
« Reply #80 on: May 18, 2014, 05:14:46 PM »
The most recent Oxygen supports jump by array.

Charles,

Exactly what do you mean by "jump by array", please? Just saw it in a later edit to your message.

This is Aurel's area :)

The sandbox, that is? Well, well... :)

Quote
For old times sake, OxygenBasic accepts line numbers too. As in ScriptBasic, they are treated as labels. I think they might be useful for diagnostics, and providing numerical references to sections.

I would've gladly changed FBSL labels' behavior to include line numbers and acquire local visibility scope (all FBSL's labels are global) but Gerome has a hell of a lot of scripts at his work and also at his customers' so he won't let me do it, lazy bones. :)

Mike Lobanovsky

  • Guest
Re: Tiny Benchmark Test
« Reply #81 on: May 18, 2014, 05:37:09 PM »
Evidently it's high time for me to try out v4.8.1 against the FBSL sources. Perhaps I'll be able to enjoy a 30% boost there too. :)

I actually did succeed in compiling FBSL v3.5 RC2 with GCC v4.8.1 and it did add a 10% to 15% boost to all my integer and floating-point benchmarks, respectively. But:

1. The size of Fbsl.exe binary has increased by 110KB from its current 606KB to 716KB.

2. GCC's new SEH scheme interferes with my own SEH implementation and doesn't work quite like I want it to. Nor am I able to either disable or override this new feature altogether.

3. The new data and code section layout within the binaries generated by GCC v4.8.1 require that I rewrite my elaborate hand-coded FBSL executable compilation routine from scratch. I'd rather not spend two more weeks of my time recoding and debugging it again.

That said, I guess FBSL v3.5 will stay as it is even if it makes it run somewhat slower than I'd like it to. That's my final decision.

Aurel

  • Guest
Re: Tiny Benchmark Test
« Reply #82 on: May 18, 2014, 10:20:42 PM »
mike
i think that you must tried with exe from pack ..because ruben2.exe is not compiled
with latest oxygen.dll because of some bugs or errors or strange reasons
in latest release i must use older dll which work properly for interprer.

Charles Pegge

  • Guest
Re: Tiny Benchmark Test
« Reply #83 on: May 18, 2014, 11:12:28 PM »
Mike,
I mean you can jump/goto an address specified by an indexed variable, as well as a simple variable or label: goto a[ b ]

Aurel,
I am using your Ruben2 source of 26 April as part of my Oxygen-checking regime, using StarFlower.RUB as a test script.

Mike Lobanovsky

  • Guest
Re: Tiny Benchmark Test
« Reply #84 on: May 18, 2014, 11:45:32 PM »
Thanks for the clarification, Charles!

Aurel, sorry but the package you sent me doesn't work for me either. It seems like your parser doesn't handle end-of-line sequences correctly on my XP Sp3 Russian. If I try to delete a line in any .RUB script, or insert a line, or shuffle the lines with variable declarations, ruben2 starts to report different variables as missing and refuses to set/get their values.

What alphabet do you use in your native language? Is it a Central European Latin charset?

I'll look into the code later on to experiment and see what may be wrong with it on my platform.

Aurel

  • Guest
Re: Tiny Benchmark Test
« Reply #85 on: May 19, 2014, 02:12:52 AM »
Quote
What alphabet do you use in your native language? Is it a Central European Latin charset?
I'll look into the code later on to experiment and see what may be wrong with it on my platform.

Mike
I use croatian keyboard but i think that this don't have nothing with your xp sp3...
i  think that problem might be new oxygen.dll....so i still use older version...
In atachment is a version which work perfectly for me..
I am not sure which version is it :-\


.
« Last Edit: May 19, 2014, 05:37:47 AM by Aurel »

Charles Pegge

  • Guest
Re: Tiny Benchmark Test
« Reply #86 on: May 19, 2014, 05:53:55 AM »
Hi Aurel,

I can compile your latest Ruben2, and run all the scripts, with the current Oxygen:

http://www.oxygenbasic.org/o2zips/Oxygen.zip

Aurel

  • Guest
Re: Tiny Benchmark Test
« Reply #87 on: May 19, 2014, 06:03:59 AM »
Hi Charles..

So then everything is ok with interpreter and code editor..right?
Hmm ...i really don't have a idea why not work on Mike computer ???
I have never problems to compile any o2 script from you or Peter
but often when you add some new things in oxygen then problems jumps out... :-\
Anyway i will backup somewhere this old dll to prevent any sort of crushing or errors.

thanks for testing... :)

Charles Pegge

  • Guest
Re: Tiny Benchmark Test
« Reply #88 on: May 19, 2014, 07:04:23 AM »

Having samples of your code, will help me detect unforseen problems :)

I also did a brief test of AsciEdit2, but it was not a full function test.

Aurel

  • Guest
Re: Tiny Benchmark Test
« Reply #89 on: May 19, 2014, 07:16:49 AM »
Quote
Having samples of your code, will help me detect unforseen problems

heh..i see, i am glad that can help .
ASciEdit2 is almost complete editor (in a term of simplicity ) which can be used for coding
o2 programs...just few things missing :-\