BBC BASIC for Windows
« DIfference between dec and hex »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:46pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: DIfference between dec and hex  (Read 381 times)
Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx DIfference between dec and hex
« Thread started on: May 27th, 2013, 6:34pm »

Hi,

Just discovered there is around a 20% increase in speed if the numerics are set in hex format rather than decimal.

Is this due to an increase in calculation steps to convert dec to binary over hex to binary?

Matt

PS No apparent increase in speed when using binary notation.
« Last Edit: May 27th, 2013, 6:39pm by Matt » User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: DIfference between dec and hex
« Reply #1 on: May 27th, 2013, 8:55pm »

on May 27th, 2013, 6:34pm, Matt wrote:
Is this due to an increase in calculation steps to convert dec to binary over hex to binary?

That hex constants are faster than decimal constants is well-known, and libraries (in particular) are often written with that in mind. I know, for example, that David Williams' GFXLIB uses hex constants extensively.

I would argue that the reason why hex is faster is of no relevance whatever; I do not discuss the internal implementation of BB4W in that kind of detail.

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls