Day 024: LCASE$
#6
(12-04-2022, 01:48 PM)SMcNeill Wrote: More coding for the programmer, but the difference in performance is going to be very noticeable.  Here, I simply made a temp array to hold all the elements of our normal Array, and I made them all lowercase *ONCE* for comparison usage.  The first routine made calls to LCASE$ twice each loop, and repeated that same process over again a second time for the outer loop.
:
Use LCASE$ and UCASE$ when you need them; just use them wisely and judiciously -- especially if your program is running slower than you'd like and you need to improve speed and performance with it.
In some cases might have to do two swaps and leave out the second transfer of array elements, discarding the "temparray" because otherwise the letter-case of the elements of "array" is destroyed only for the sake of doing fast comparisons. Only compare elements of "temparray" but swap things in both arrays to keep them in sync.
Reply


Messages In This Thread
Day 024: LCASE$ - by Pete - 12-04-2022, 05:17 AM
RE: Day 024: LCASE$ - by mnrvovrfc - 12-04-2022, 12:01 PM
RE: Day 024: LCASE$ - by luke - 12-04-2022, 01:25 PM
RE: Day 024: LCASE$ - by SMcNeill - 12-04-2022, 01:48 PM
RE: Day 024: LCASE$ - by mnrvovrfc - 12-04-2022, 05:57 PM
RE: Day 024: LCASE$ - by SMcNeill - 12-04-2022, 10:47 PM
RE: Day 024: LCASE$ - by Pete - 12-04-2022, 04:10 PM
RE: Day 024: LCASE$ - by Pete - 12-04-2022, 06:47 PM
RE: Day 024: LCASE$ - by SMcNeill - 12-04-2022, 11:16 PM
RE: Day 024: LCASE$ - by Pete - 12-05-2022, 12:59 AM
RE: Day 024: LCASE$ - by luke - 12-05-2022, 07:30 AM
RE: Day 024: LCASE$ - by mnrvovrfc - 12-05-2022, 08:24 AM
RE: Day 024: LCASE$ - by Pete - 12-05-2022, 10:38 AM



Users browsing this thread: 5 Guest(s)