25 November 2015, 12:20 | #1 |
Registered User
Join Date: Aug 2009
Location: Dagenham / England
Posts: 182
|
Basic info needed
I am currently writing a program in hisoft basic 2 that uses 1000's of integer numbers. Its a pain testing the program as it can take a couple of minutes to load and display the current data. Would it be any quicker if I used hex numbers instead? Also which is quicker Hisoft basic 2 or Amos pro as they both have then own compiler?. I used Hisoft as it I don't need any fancy and looking at Amos it seems like a programming language with all the bells and whistles. Sorry I am just no good with any other language as at 50 years old I am sort of set in my ways. Many thanks for any advice received.
|
25 November 2015, 13:38 | #2 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
|
AmosPro is easy and has a good editor and lots of features. Its weak spot is that its compiler generates inefficient code.
If you can use HiSoft instead, I'd imagine it would produce faster code. ACE Basic on the Aminet might be another option since I haven't tested the latest version of it. Let us know what you decide in the end. |
25 November 2015, 18:48 | #3 |
Registered User
Join Date: Aug 2009
Location: Dagenham / England
Posts: 182
|
Thank you, looks like I will stick with the Hisoft then but I will take a look at Ace as I had'nt heard of this one. Just need to know now if using hex numbers work quicker than integer
|
25 November 2015, 23:36 | #4 |
Registered User
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
|
I would have thought (possibly wrongly) that most Basic's are geared toward Integer numbers rather than Hex, as they are easier for humans to understand.
I have just checked in AMOS Pro (emulated) and the following:- Timer=0 For I=0 To 1048575 Next I Print Timer Timer=0 For I=0 To $FFFFF Next I Print Timer the HEX version takes 1/50 second longer than the integer version. (probably due to the conversion process on each iteration) So I think it's safe to say that in Amos at least, Integer Decimal is quicker. >EDIT< After multiple (100+) tries at this, I was wrong.... There is never more than a 1/50 difference, sometimes int is faster than hex and sometimes not, it is roughly the same over time. so the savings are going to be minimal (unless your calculations are slowing things down?) Last edited by volvo_0ne; 25 November 2015 at 23:45. |
25 November 2015, 23:41 | #5 | |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
Quote:
In theory yes, hex needs less time for the machine to display. |
|
25 November 2015, 23:53 | #6 |
Registered User
Join Date: Aug 2009
Location: Dagenham / England
Posts: 182
|
I am using large arrays. eg one of them is 280,34,20 which contains integers. When testing I have to keep loading the data to make sure the fields has the correct data. If though I have a scsi drive all the data can take a couple of mins to load so this slows devoloping time. Thank you for that info Volvo One. I will try something similar but to include loading and saving
|
26 November 2015, 01:06 | #7 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
If you are saying that you store your numbers in a text file, you'll probably notice great speed increases if you store them as pure binary numbers instead.
I'm totally unfamiliar with HiSoft Basic, but storing something like chr$(number) might do it. |
26 November 2015, 10:43 | #8 |
Registered User
Join Date: Aug 2009
Location: Dagenham / England
Posts: 182
|
Did some test with hex, no speed increase gained. Will give binary ago
|
26 November 2015, 18:50 | #9 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
Reading the manual...if you go to page 91.
The example goes: Dim A%(16000) BLOAD "thefilenamehere",VARPTR(A%(0)) That should be near the fastest you can achieve loading data from disk. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
F-Basic! Needed! | Nerbflong | request.Apps | 32 | 15 July 2021 21:10 |
AROS info needed | DeafDaz | New to Emulation or Amiga scene | 20 | 06 September 2011 05:19 |
IDE Interface info needed | mihcael | support.Hardware | 7 | 20 January 2011 09:09 |
MiniMig Repair (needed INFO) | Zetr0 | Hardware pics | 9 | 29 March 2010 07:56 |
Info needed on A1200 expansion | Merlin | support.Hardware | 22 | 27 April 2007 14:04 |
|
|