6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed Apr 24, 2024 7:10 am

All times are UTC




Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject: Re: Benchmarking
PostPosted: Fri Sep 24, 2021 7:36 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1395
Location: Scotland
BillG wrote:
To be honest, I have not personally run your benchmark so have no experience with it.

I have little interest in benchmarking BASIC interpreters and probably will not until floating point is implemented in my compiler.


At which point the speed-ups are going to be marginal unless you can better the FP code used in BBC Basic 4. You'll save on things like loop variables which are also floating point if you can detect and reduce them to integer values and the usual other BASIC overheads like end of statement/line detection, next line, GOTOs and so on.

If I can be bothered I'll make a condensed BBC Basic version, however when I hand-translating this on a statement by statement basis into compiled BCPL on the same platform it did go significantly faster, however 4-byte floats vs. 5 bytes in BBC Basic, also I was using a floating point co-processor - which is still an 8-bit micro running at 16Mhz (same speed as my '816), however it has the advantage of a hardware 2-cycle 8x8 multiply.

The limit for this really is floating point performance.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
 Post subject: Re: Benchmarking
PostPosted: Fri Sep 24, 2021 8:27 am 
Offline

Joined: Thu Mar 12, 2020 10:04 pm
Posts: 690
Location: North Tejas
So in your benchmark, all of that BASIC code is merely "glue" between a number of expensive floating point operations. Got it.

That reminds me of a post I have been meaning to make about compiled glue code between expensive operations...


Top
 Profile  
Reply with quote  
 Post subject: Re: Benchmarking
PostPosted: Fri Sep 24, 2021 4:20 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 990
Location: near Heidelberg, Germany
Just started reading this thread so no idea if it has been mentioned before....https://extrapages.de/archives/20140804 ... hmark.html

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
 Post subject: Re: Benchmarking
PostPosted: Fri Sep 24, 2021 4:24 pm 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Nice read, thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: Benchmarking
PostPosted: Sun Sep 26, 2021 8:40 pm 
Offline

Joined: Sat Jul 09, 2016 6:01 pm
Posts: 180
Where was the fastest ROM Basic written? It seems that the fastest ROM Basic is not American, not British, not Russian, but Swedish.
Results of my experiments with the ABC 800 emulated on MAME/MESS show that the ABC 802 can build this fractal picture for about 93 seconds. It is faster than the BBC Master 128. The ABC 800 is a computer released in 1981. Its CPU is relatively slow, it is the Z80@3MHz. So its results are really great. However it uses single precision FP by default, 4 bytes for a number. BBC Basic uses 5 bytes. So if we normalize results giving 25% advance to the BBC Master we get that the BBC Master is slightly faster after all.
ABC Basic uses semi-compilation. It does error checking immediately, you don't need to start program to get a break on a error. Moreover it can handle long fp numbers with up to 125 digits! Such thing was possible only on mainframes in 1981!


Attachments:
abc802-mandel.png
abc802-mandel.png [ 3.37 KiB | Viewed 1964 times ]

_________________
my blog about processors


Last edited by litwr on Mon Sep 27, 2021 7:21 am, edited 1 time in total.
Top
 Profile  
Reply with quote  
 Post subject: Re: Benchmarking
PostPosted: Sun Sep 26, 2021 10:00 pm 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
(do you have a reference for 125 digit calculation? I can't find it!)


Top
 Profile  
Reply with quote  
 Post subject: Re: Benchmarking
PostPosted: Mon Sep 27, 2021 7:24 am 
Offline

Joined: Sat Jul 09, 2016 6:01 pm
Posts: 180
BigEd wrote:
(do you have a reference for 125 digit calculation? I can't find it!)

I have made a screenshot
Attachment:
abc802-longfp.png
abc802-longfp.png [ 3.82 KiB | Viewed 1967 times ]

These long fp operations are described in this Basic manual.

It is astonishing that even the ABC80 from 1978 had almost the same Basic features as the ABC800. Of course, ABC80 Basic is less developed and slower than ABC800 Basic.

_________________
my blog about processors


Top
 Profile  
Reply with quote  
 Post subject: Re: Benchmarking
PostPosted: Mon Sep 27, 2021 10:31 am 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Thanks -that's wonderful. So we have ADD$, MUL$, DIV$ which take two strings and optionally a precision. A very nice way to provide for conventional integer and floating point, as well as extended precision arithmetic.


Top
 Profile  
Reply with quote  
 Post subject: Re: Benchmarking
PostPosted: Sat Oct 02, 2021 8:15 am 
Offline

Joined: Sat Jul 09, 2016 6:01 pm
Posts: 180
I have just run the benchmark on the emulated ABC802 using double precision FP. The result is 205s - it is approximately 120% slower than single precision FP result. So the dependency between the accuracy and timing is more than linear and this means that the BBC Master normalized Basic performance is even greater if we compare it with the ABC performance.
More results is here. It would be interesting to add a result from the Master Compact. Wiki claims that its Basic is about 30% faster than Basic of the BBC Master.
Attachment:
File comment: the ABC802 doupble precision fp
abc802-mandel-double.png
abc802-mandel-double.png [ 3.42 KiB | Viewed 1918 times ]

_________________
my blog about processors


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: