| Playing with Scan Codes |
| QTIPS - Compiling Protection Code |
| QTIPS - Invalid Code and Command |
| QTIPS - Code/Command Help |
| Compiling 64K on a Shoestring by Blaise Wrenn (LexStat Systems Ltd) |
| QTIPS - Using @Upper.Case and @Lower.Case with Foreign Languages |
| @ATTACK - @Lower.Case |
| Sorting out Collation Sequences by Mike Pope |
| QTIPS - Using @Upper.Case and @Lower.Case with Foreign Languages |
| @ATTACK - @Lower.Case |
| @ATTACK - @Upper.Case |
| Sorting out Collation Sequences by Mike Pope |
| QTIPS - Btree.Extract |
| Comp |
| Reader's Clinic - Removing "Searching Cross References" Message |
| @ATTACK - @List.Active |
| IConvs / OConvs |
| Reader's Clinic - Stop Lists |
| REVMEDIA Revisited |
| REVMEDIA Revisited |
| Vroom |
| RTP Series - RTP5 |
| VERBatim - V15 |
| Play it Again, Cam |
| QTIPS - BASIC Options |
| Utility Diskette # 4 |
RevMedia FKB
| Document | V1I10A6 |
| Title | Vroom |
| Keywords | VROOM INDEX SELECT BASIC PERFORM SPEED FIELD |
| Text | As promised the first in an occasional series WITH hints on getting the most FROM Advanced Revelation Whilst it is generally more cost effective to put in faster HARDWARE than spend weeks optimising software an awareness of possible improvements is still useful Some of the hints included here may seem obvious but all are taken FROM hints delivered to experienced REV/AREV programmers recently Testing For a Value It is frequently necessary when eliciting user response to ensure that the information returned is valid This can be done in the following manner (the code is by way of EXAMPLE only obviously it can be improved in other ways popups collectors @LOWER CASE etc) VALID = 0 ANS = "" LOOP CALL MSG("Y/N" "RC" ANS "") IF ANS="Y" OR ANS="y" OR ANS="N" OR ANS="n" THEN VALID = 1 END UNTIL VALID REPEAT however it can be accomplished more efficiently WITH the construct VALID = 0 ANS = "" LOOP CALL MSG("Y/N" "R" ANS "") IF INDEX("YyNn" ANS 1) THEN VALID = 1 UNTIL VALID REPEAT This construct ALSO has the advantage that its PERFORMANCE hardly degrades as the amount of comparisons increase unlike the former method In the table below the same comparisons were performed multiple times to evaluate the times taken for each FROM this it can be seen that INDEX is quicker even if testing for a single value (This benchmark was performed on 2 0) Comparisons ³ 1 ³ 2 ³ 3 ³ 4 ³ 10 ÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄ INDEX ³ 2 03 ³ 2 08 ³ 2 09 ³ 2 11 ³ 2 36 IF n OR n ³ 2 25 ³ 3 35 ³ 4 45 ³ 5 60 ³ 12 14 Extracting Parts of Keys When dealing WITH a two part key (or similar) it is quicker to use the FIELD function (EG PART1 = FIELD(KEY "*" 1)) than to use the [ ] syntax (EG PART1 = KEY[1 "*"]) Selecting Records FROM File When selecting records FROM file for subsequent processing AND THE FIELDS FORMING THE SELECTION CRITERIA ARE NOT INDEXED it is quicker to extract the required records by reading in all records and doing the required comparison in BASIC than by PERFORMing a select I have seen the latter done at several sites visited lately and speed improvements of upto 100% have been gained by adopting the former method (depending on the complexity of he comparison criteria) (Volume 1 Issue 10 Pages 8 9) |
Page last modified: 17/02/03