LB Booster
« Effect of variable length on speed »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:37am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Effect of variable length on speed  (Read 146 times)
RobM
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 91
xx Re: Effect of variable length on speed
« Reply #1 on: Nov 27th, 2017, 06:03am »

Interesting! I would not have thought the length of a variable name would make any difference at all.

Wont change my programming style though, I like to have names that are self descriptive smiley
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Effect of variable length on speed
« Reply #2 on: Nov 27th, 2017, 08:37am »

on Nov 27th, 2017, 06:03am, RobM wrote:
I would not have thought the length of a variable name would make any difference at all.

Typically it will make a difference in the case of a language that supports the EVAL function (like Liberty BASIC and BBC BASIC) because the original variable names must be retained in the running program in case they are referenced that way:

Code:
    input "Enter the name of a variable: ";var$
    print "That variable currently has the value ";EVAL(var$) 

BBC BASIC provides a 'compiler directive' that allows the programmer to specify which variable names need to be retained, and which don't (the default), which provides the best of both worlds. But - although in principle it could have done - LBB has not inherited this feature.

Richard.
User IP Logged

RobM
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 91
xx Re: Effect of variable length on speed
« Reply #3 on: Nov 27th, 2017, 9:33pm »

Thanks. I was wondering why it would make a difference and that pretty much explains it!
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