Remote-processing CAMBASIC Manual de usuario Pagina 24

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 208
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 23
Program ing Tips - 1
How to Maximize Execution Speed
1. Use the pre-compiled variable A% to Z%. In an average program these will run 50% faster. U se as many as
possible, especially in FOR/ NEXT loops and softwar e counters.
For other variables there is a lookup time. To minimize lookup time declare the variables at the beginning of
the progr am to for ce them to be at the beginning of the variable table. Put the var iables which need to
execute fastest at the beginning.
10 A=0:B=0:C=0:A$=""
2. Use constants rather than variables whenever possible in all functions and statements. Except for the pre-
compiled variables above, a “ lookup” time is required.
POKE &9000,4 fastest
POKE A%,B% fast
POKE A,B slowest
3. The speed of execution is independent of the length of the variable name.
4. Place several statements on the same line. This will yield a slight increase in speed at the expense of clarity.
5. Use INC and DEC whenever possible. T hey are much faster than the standard syntax to increment variables.
INC A% fastest
INC A fast
A=A+1 slowest
6. All string operations a re slow. T his is especially true when concatenating strings. When pr inting, avoid
string concatenation.
PRINT A$;B$ fast
PRINT A$+B$ slow
7. Certain mathematical operations have long execution times: multiply, divide, SIN, COS, ATN, SQR, LOG,
EXP and $.
8. Replace a list of conditionals w ith the ON GOT O statem ent:
10 ON X GOTO 200,300,400,500 fast
10 IF X=1 GOTO 200 very slow
20 IF X=2 GOTO 300
30 IF X=3 GOTO 400
40 IF X+4 GOTO 500
9. Even though remarks are not executed, there is a slight amount of overhead to skip over the list number. You
Vista de pagina 23
1 2 ... 19 20 21 22 23 24 25 26 27 28 29 ... 207 208

Comentarios a estos manuales

Sin comentarios

Mts manuals

The list of Mts product deivces contains 538 user manuals and guides for 496 models in 3 type of devices

Hardware
Models Document Type
Пневматический захват тискового типа 1 кН User Manual   Инструкция по эксплуатации MTS Пневматический захват тискового типа 1 кН, 2 pages
Ручной винтовой захват 5 кН User Manual   Инструкция по эксплуатации MTS Ручной винтовой захват 5 кН, 2 pages
Ручной захват ножничного типа 2 кН User Manual   Инструкция по эксплуатации MTS Ручной захват ножничного типа 2 кН, 2 pages
Ручной захват ножничного типа 5 кН User Manual   Инструкция по эксплуатации MTS Ручной захват ножничного типа 5 кН, 2 pages
Ручной захват тискового типа 5 кН User Manual   Инструкция по эксплуатации MTS Ручной захват тискового типа 5 кН, 2 pages
Software
Models Document Type
Series 793 Utility Software User Manual   MTS Series 793 Utility Software User Manual, 124 pages
Echo Software User Manual   MTS Echo Software User Manual, 42 pages
Series 793 Application User Manual   MTS Series 793 Application User Manual, 576 pages
Landmark System User Manual   MTS Landmark System User Manual, 126 pages
Landmark TWX User Manual   MTS Landmark TWX User Manual, 162 pages