English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 25 November 2015, 12:20   #1
Dagger
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.
Dagger is offline  
Old 25 November 2015, 13:38   #2
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
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.
Samurai_Crow is online now  
Old 25 November 2015, 18:48   #3
Dagger
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
Dagger is offline  
Old 25 November 2015, 23:36   #4
volvo_0ne
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.
volvo_0ne is offline  
Old 25 November 2015, 23:41   #5
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Quote:
Originally Posted by Dagger View Post
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
Ummm, maybe if you tell us what are you trying to achieve someone would be able to help. Why do you display the numbers? Wouldn't the hex representation of the numbers "hurt" the reason you display them?

In theory yes, hex needs less time for the machine to display.
alkis is offline  
Old 25 November 2015, 23:53   #6
Dagger
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
Dagger is offline  
Old 26 November 2015, 01:06   #7
idrougge
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.
idrougge is offline  
Old 26 November 2015, 10:43   #8
Dagger
Registered User
 
Join Date: Aug 2009
Location: Dagenham / England
Posts: 182
Did some test with hex, no speed increase gained. Will give binary ago
Dagger is offline  
Old 26 November 2015, 18:50   #9
alkis
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.
alkis is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:29.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.15853 seconds with 15 queries