Maury Markowitz Posted May 28, 2021 Share Posted May 28, 2021 I've created a little GitHub repo with text versions of various Atari BASIC benchmarks. You can cut-and-paste them into Atari800Mac, and I assume most other emulators too. If anyone has a "more original" version of the Byte Sieve I'd love to add it. Wilkinson's version merged lines together, which makes the program run (marginally) faster, and has other changes which make it less useful for head-to-head comparisons with other platforms. Quote Link to comment Share on other sites More sharing options...
Faicuai Posted May 28, 2021 Share Posted May 28, 2021 Just finished porting Bench64 to Atari Basic, so it runs fully on all compatible basic packages. Results are revealing, to say the least... ? I will post it here. Quote Link to comment Share on other sites More sharing options...
Maury Markowitz Posted May 28, 2021 Author Share Posted May 28, 2021 Yes please! Did you just cut and paste the DEF FNs? Quote Link to comment Share on other sites More sharing options...
Faicuai Posted May 28, 2021 Share Posted May 28, 2021 24 minutes ago, Maury Markowitz said: Did you just cut and paste the DEF FNs? DEF FN are emulated by use of [global-variable assignment, gosub, return] and [final local-variable assignment] if actually needed. Performance penalty for Atari would be up to 50% increase of exec. times (as measured DEF FN() vs. emulated in Microsoft Basic II), but can be compensated with interpreter's efficiency of handling Gosub / Goto. In any case, results will be on the conservative siide. FNs (and everything else) have been placed exactly on same locations and line #s (and same functional scope) as original source. Still, you will be pleased with results... (BasicXL, Altria Basic or Turbo Basic). String-rotation routine is already a walk-in-the-park (and efficiently implemented) in Atari Basic. Overall, I am already getting a global index that goes from 209 to 240, and no compiiled code involved yet. Quote Link to comment Share on other sites More sharing options...
JKK Posted May 28, 2021 Share Posted May 28, 2021 AFAIK Atari Basic was terribly slow. It would be interesting to compare the results with Action! and assembler... Quote Link to comment Share on other sites More sharing options...
Maury Markowitz Posted May 28, 2021 Author Share Posted May 28, 2021 Well these are BASIC benchmarks, so all you'd learn is "BASIC is slow"! 3 Quote Link to comment Share on other sites More sharing options...
Faicuai Posted May 28, 2021 Share Posted May 28, 2021 28 minutes ago, JKK said: It would be interesting to compare the results with Action! and assembler... I will also upload here a well laid-out and 6502-optimized (but totally portable) versions of Sieve... One is the canonical Byte-version, and the other is the Wiki-version, with optimized (quadratic) inner-loop. Both time x10 runs, as expected. Pure, pretty, and abundantly-documented ASM code, fully portable to Apple. Commodore, etc. 1 Quote Link to comment Share on other sites More sharing options...
Faicuai Posted May 28, 2021 Share Posted May 28, 2021 1 hour ago, Maury Markowitz said: Yes please! Here (in SDX format / mode): Scratchpad-DOS-90K-AA.ATR Quick notes: Bench64.LST is Atari-text version. Rest are Atari Basic (thus TurboBasic-XL) and Basic-XL versions. FN-test (DEFN vs. emulation) runs on MSB2 (provided only for reference purposes). Atari Macro Assembler code: Sieve-2G conforms to Wiki's algorithmic definition, with quadratic inner loop, yielding in 1028 primes out of 8191-cells array. Sieve-3E conforms to Byte's algorithmic definition, having been hand-optimized for 6502 (conforming to 16-bit arithmetic's at every possible turn). Sieve-4A conforms to Byte's algorithmic definition, originally written for Apple-II, and hand-ported by me to Atari Macro-Assembler. Sieve-5A DOES NOT conform with any of the above algorithmic definitions, and it is highly optimized in many ways. Also from Apple-II records. Timing and Prime counts registers in Page-0 are documented on source-listings, per names above. All of these are PORTABLE to any 6502-based system, provided that a minimum of Page-0 regs. and RAM are available. Have fun! Quote Link to comment Share on other sites More sharing options...
Maury Markowitz Posted May 30, 2021 Author Share Posted May 30, 2021 On 5/28/2021 at 3:21 PM, Faicuai said: Here (in SDX format / mode): No joy, "Error: No DOS". Did I miss a step? Quote Link to comment Share on other sites More sharing options...
Faicuai Posted May 31, 2021 Share Posted May 31, 2021 10 hours ago, Maury Markowitz said: No joy, "Error: No DOS". Did I miss a step? No, you did not. It is just that SDX images are not bootable, because they expect SDX already booted (from ROM) on your host machine or session. Just grab Altirra emulator, and go to "TOOLS -> DISK EXLPLORER" and extract any files you may wish.... ...Or you could just plug a SDX image as cart and boot it with Altirra (on XL mode), and access the .ATR mounted as D1: Quote Link to comment Share on other sites More sharing options...
thorfdbg Posted May 31, 2021 Share Posted May 31, 2021 On 5/28/2021 at 7:35 PM, JKK said: AFAIK Atari Basic was terribly slow. It would be interesting to compare the results with Action! and assembler... There are certainly Atari Basic variants where these problems were addressed. Basic++ is one of them. The two causes for the slowness were the rather inconvenient BCD arithmetics of the MathPack, and the line number search which was just a linear search from start to end. Quote Link to comment Share on other sites More sharing options...
Faicuai Posted May 31, 2021 Share Posted May 31, 2021 3 hours ago, thorfdbg said: Basic++ is one of them Have you run Bench64.bas provided in .ATR above on Basic++? What are the best results you are getting? Quote Link to comment Share on other sites More sharing options...
Faicuai Posted June 2, 2021 Share Posted June 2, 2021 On 5/31/2021 at 6:00 AM, thorfdbg said: Basic++ is one of them In cased you missed the question above, I asked because I had already attempted running Bench64 on Basic++ 1.08 and it actually fails to run (with Altirra FP pack or XL-extended FP pack). On the other hand, Altirra Basic, Basic XL and Turbo Basic all run the test, successfully. I wonder what exactly is needed to get that benchmark running on Basic++ 1.08 Quote Link to comment Share on other sites More sharing options...
thorfdbg Posted June 2, 2021 Share Posted June 2, 2021 7 hours ago, Faicuai said: I wonder what exactly is needed to get that benchmark running on Basic++ 1.08 That would surprise me. Where's the image to test with ("above" is probably not precise enough). From the github repo: AHL: 9.699E-03 / 5.170723 / T=45.5 Broucke: 503.543595 / 1.23 / T=7.68333333 Dolkus: 1000003 / T=9.35 RG1: T=1.1 RG2: T=3.76666666 RG3: T=11.9666666 RG4: T=13.4833333 RG5: T=14.9533333 RG6: T=22.7533333 RG7: T=31.7166666 RG8: T=9.17166666 Sieve: 1899 / T=142.33333 Thus, it seems everything is in fine working order. Details, please? Quote Link to comment Share on other sites More sharing options...
Maury Markowitz Posted June 2, 2021 Author Share Posted June 2, 2021 (edited) On 5/30/2021 at 8:33 PM, Faicuai said: Just grab Altirra emulator, Love to, but it doesn't run on my Mac ? I'll go find a SDOS cart. I couldn't afford a floppy when I was a kid, so DOSes are new to me. ...up and running. Ok, how do I output to a text file? TYPE BENCH64.LST >>PRN produced a file called PRN within DOS, so I assume the whole ">>PRN" redirect only works for DIR or I can't get the syntax right. Ahhh, so for DIR its >>PRN, and for TYPE its >>PRN:. Makes perfect sense ? Edited June 2, 2021 by Maury Markowitz Quote Link to comment Share on other sites More sharing options...
Maury Markowitz Posted June 2, 2021 Author Share Posted June 2, 2021 (edited) 55 minutes ago, thorfdbg said: That would surprise me. Where's the image to test with ("above" is probably not precise enough). From the github repo: I'd like to start collecting times from various basics for another file in the repo. Can you tell me the conditions for these times? Which emulator (or machine), math pack and version of Basic++? Edited June 2, 2021 by Maury Markowitz Quote Link to comment Share on other sites More sharing options...
Faicuai Posted June 2, 2021 Share Posted June 2, 2021 1 hour ago, thorfdbg said: That would surprise me. Where's the image to test wit Here (it is there, trust me... ? Please, let us know the version of Basic++ (and the FP packages) that gets Bench64 done. Quote Link to comment Share on other sites More sharing options...
Faicuai Posted June 2, 2021 Share Posted June 2, 2021 51 minutes ago, Maury Markowitz said: when I was a kid, so DOSes are new to me Same here (early times), but was always in contact with them (by other means), and eventually found them indispensable, though. I will sort this out for you. I will add the .TXT file format, here. FYI, I do have multiple files / tests hand-and-cleanly coded, selected over the years... I will try to get some of those for you, as well. Quote Link to comment Share on other sites More sharing options...
drac030 Posted June 2, 2021 Share Posted June 2, 2021 1 hour ago, Maury Markowitz said: Ahhh, so for DIR its >>PRN, and for TYPE its >>PRN: It is actually >>PRN: for both. 1 hour ago, Maury Markowitz said: Makes perfect sense Yes, it does. Quote Link to comment Share on other sites More sharing options...
Maury Markowitz Posted June 2, 2021 Author Share Posted June 2, 2021 (edited) 15 minutes ago, drac030 said: It is actually >>PRN: for both. Documentation error then. DIR >>PRN redirects the output... Edited June 2, 2021 by Maury Markowitz Quote Link to comment Share on other sites More sharing options...
drac030 Posted June 2, 2021 Share Posted June 2, 2021 20 minutes ago, Maury Markowitz said: Documentation error then. Indeed, a typo on page 125. I have sent a mail to the documentation master, @GBXL, about it. Thank you. Quote Link to comment Share on other sites More sharing options...
Maury Markowitz Posted June 2, 2021 Author Share Posted June 2, 2021 I put your version of scruss's test in the repo, thanks Faicuai! I added a new RESULTS file to the repo. I ran all tests stock for Rev C using Atari800Mac. Ahl is off by 1 or 4 seconds depending on which machine you compare to, 400/800 or 1200XL. That's interesting. If anyone has a hardware version of the 400/800 and 1200XL it would be nice to get those in there too, I am curious if the changes are due to the emulator or are just weird measurements in the original source. For instance, shouldn't the 400/800 time be identical to the 1200? Running through other versions now... BASIC XL, XE and Turbo to follow. Quote Link to comment Share on other sites More sharing options...
Maury Markowitz Posted June 2, 2021 Author Share Posted June 2, 2021 1 hour ago, drac030 said: Indeed, a typo on page 125. I have sent a mail to the documentation master, @GBXL, about it. Thank you. Another suggestion: all examples of this sort should be in a monospace font. The space between DIR and >> is not clearly visible and appears to be required. Quote Link to comment Share on other sites More sharing options...
thorfdbg Posted June 2, 2021 Share Posted June 2, 2021 2 hours ago, Faicuai said: Here (it is there, trust me... ? Please, let us know the version of Basic++ (and the FP packages) that gets Bench64 done. What's "Bench64"? There is no Bench64 in the github repo you quoted. Quote Link to comment Share on other sites More sharing options...
Faicuai Posted June 2, 2021 Share Posted June 2, 2021 1 hour ago, Maury Markowitz said: I put your version of scruss's test in the repo, thanks Faicuai! Got prepared something special for you, this time on auto-boot "duped" Atari Dos 2.5 ? Scratchpad-DOS-90K-III.ATR Quick summary of what you will find (and how to have fun): System-level (all loadable and executable through DUP.SYS Loiad-file facility): XE03IFPE.REX: soft-loadable XLXE OS, with Altirra's FP-pack, high-performance E: accel., and dormant 1200XL DMA / Keyb. control recovered. XE03IFPX.REX: soft-loadable XLXE OS, with extended FP-pack (taking Int'l char. set), and dormant 1200XL DMA / Keyb. control recovered. ATBAS157.REX: soft-loadable Altirra Basic v1.57, auto-start via OS-boot manager (good for OS XL 2/3/4, Q-Meg4.04, OS/b, OS/n and Alt 3.31) RESET.COM: XL/XE and Incognito-compatible Warm-Start, returning control to ROM-based OS and user memory-space. GOCARTS.COM: OS-manager return to soft-loaded cart. images (like ALTBAS157.REX, after issuing "DOS" command). Benchmarks: BENCH64.BAS / LST: as already posted above. FPTEST34.BAS / LST: general, "baselining" [PRECISION & SPEED] index, which yields ~1.00 on Atari Basic + OEM FP pack. FPTEST38.BAS / LST: Atari-Basic optimized SIEVE benchmark, algorithmically compliant with WiKi's canonical ("quadratic") optimization. SIEVEACT.BAS / LST: Atari-Basic optimized SIEVE benchmark, algorithmically compliant with BYTE's classical definition. PCW TESTS .IBA/BAS/LST: classical battery of Basic tests, for OSS Integer Basic and Atari Basic. File "PCWTESTS.LST" can be ran directly to show summary for five (5) different Interpreters / Environments (results have been pre-recorded and organized to simply show them per "test group", user-selectable). Basic++ 1.08 CANNOT run Bench64.bas to completion, in presence of XE03IFPE and XE03IFPX OS-loads, and not even OS/b with Newell FastChip. At least, I have not been able to find the right settings or procedure to get it working here, but Altirra Basic and TurboBasic work like a charm. Have fun! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.