[Gambas-user] Doing keyword operations/lookups

Brian G brian at westwoodsvcs.com
Sun Jan 24 14:52:42 CET 2021


I have attached a script which compares two methods of handling keyword processing in a program. That is looking up the symbol followed by doing processing as required. 

Method one used a collection, and key word index lookup the value being an integer index, followed by an 
On key Goto xxx,xxx,xxx,... 

Method two uses select and case for the keys 

The first method it two to three times faster than the second especially when using fast. 
Would the first method be considered usable, or is there a better way to gain the performance. 

Anyone have any ideas? 
It sure looks ugly! 


Thank You 
Brian G 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210124/8432abca/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testKeywordLookup.gbs
Type: application/octet-stream
Size: 1217 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210124/8432abca/attachment.obj>


More information about the User mailing list