SecureUser
VERBatim - V86
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
@ATTACK - @Reduction.Done
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)
VERBatim - V25
REVMEDIA Revisted
QTIPS - Code/Command Help
QTIPS - Improving the Message Window
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
@ATTACK - @Modal
@ATTACK - @Return.Value
QTIPS - DOS File Names
DOS Interfacing (Part II)
VERBatim - V116
@ATTACK - @Pri.File
@ATTACK - @Rollout.File
File Variables
How Indexes Are Updated
Index Record Layouts
QTIPS - File Variable of File In SELECT Statement
QTIPS - Amending non-Attached Files
LINEAR HASH FILE STRUCTURES - Part 1
Index Flush
QTIPS - File Handle Structure
Background Processing
Vroom - Window Processing
VROOM - Window Processing II
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
Reader's Clinic - Incorrect Indexes
Vroom
RTP Series - RTP20
RTP Series - RTP12
Form.List.S
VERBatim - V5
@ATTACK - @Last.Select.Process
@ATTACK - @Save.Select
QTIPS - File Variable of File In SELECT Statement
QUERY.SUB
REVMEDIA Revisited
QTIPS - Extended Select Syntax
Spindex - A Review
Spindex vs BondTRV
REVMEDIA Revisited
QTIPS - Replacing GAS.BAR routine during PERFORM "SELECT"
QTIPS - Extended Select BY
QTIPS - EasyWriter
QTIPS - MFS - Select.Index
Vroom
Vroom - Window Processing
Reader's Forum
VROOM - Doubling MFS Write Speed

RevMedia FKB

DocumentV1I10A6
TitleVroom
KeywordsVROOM
INDEX
SELECT
BASIC
PERFORM
SPEED
FIELD
TextAs 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)
[revmedia/copyrigh.htm]

Page last modified: 17/02/03