This Appendix gives performance statistics for the PRIMDAT routines in the form of typical execution times. These are provided primarily to assist in the choice of routine for a particular purpose, but they also provide a benchmark against which alternative algorithms and future improvements can be judged.
In practice, execution times depend on many factors, such as the particular processor being used, the number of page faults generated and (in many cases) the routine argument values. Consequently, great care should be exercised if comparing the figures given here with the performance of a real application. Nevertheless, the figures do give a good indication of the relative efficiency of the routines, and are generally repeatable within 5 or 10 per cent. Users who know of more efficient algorithms are encouraged to contact the author so that they may be tested under identical conditions and, if appropriate, incorporated into this package.
The statistics presented here have been gathered on the Durham MicroVAX II (DUMV1), using a program which processes a sequence of data obtained from an input array (or arrays) and returns the results to a separate output array. For instance, in the case of the NUM_ADDR function, it is equivalent to the simple loop:
The figures given represent the CPU time used to calculate one result (i.e. the total CPU time used by this loop divided by N), each being the median of five separate determinations. Note that the cost of executing the loop and of accessing the arguments and assigning the result is included, since these overheads will typically feature in most real applications.
The cost of page faults is not included, however. These will usually occur when data arrays are accessed for the first time (and subsequently if the array is large or has not been accessed for a while). The cost of page faults is difficult to quantify, as it may be installation-dependent and will also depend on the level of system activity at the time. However, as a very rough guide, page faulting on the Durham MicroVAX II adds a broad average of around 7s to the CPU time figure for routines which access a single _REAL argument array and around 11s for routines accessing two _REAL argument arrays. Page faults also impose a larger elapsed time overhead, so that their effect can be substantial and can often make small apparent differences in routine performance seem insignificant in practice.
| D | R | I | W | UW | B | UB
| |||||||||
ADDT | 100 | 82 | 94 | 78 | 89 | 76 | 89 | 77 | 95 | 83 | 89 | 76 | 97 | 85 | ||
SUBT | 100 | 82 | 94 | 79 | 89 | 76 | 89 | 77 | 95 | 83 | 88 | 76 | 97 | 85 | ||
MULT | 102 | 83 | 95 | 79 | 93 | 81 | 94 | 82 | 99 | 88 | 92 | 79 | 101 | 91 | ||
DIVT | 105 | 85 | 96 | 81 | 110 | 98 | 111 | 99 | 109 | 97 | 105 | 93 | 111 | 98 | ||
IDVT | 151 | 134 | 139 | 122 | 103 | 91 | 98 | 85 | 103 | 90 | 94 | 82 | 105 | 94 | ||
PWRT | 410 | 395 | 287 | 270 | 140 | 127 | 139 | 127 | 140 | 128 | 135 | 124 | 140 | 129 | ||
NEGT | 51 | 44 | 48 | 42 | 47 | 48 | 47 | 48 | 59 | 57 | 48 | 48 | 52 | 51 | ||
SQRTT | 120 | 115 | 111 | 107 | 114 | 113 | 115 | 113 | 122 | 119 | 115 | 114 | 113 | 111 | ||
LOGT | 186 | 178 | 134 | 130 | 137 | 136 | 140 | 136 | 149 | 146 | 140 | 137 | 141 | 139 | ||
LG10T | 194 | 190 | 141 | 137 | 146 | 143 | 146 | 143 | 157 | 154 | 146 | 143 | 149 | 147 | ||
EXPT | 198 | 188 | 163 | 153 | 167 | 160 | 168 | 160 | 173 | 167 | 168 | 158 | 182 | 175 | ||
ABST | 53 | 47 | 48 | 42 | 49 | 48 | 54 | 55 | 45 | 41 | 49 | 50 | 43 | 43 | ||
NINTT | 121 | 112 | 108 | 101 | 45 | 42 | 45 | 42 | 45 | 42 | 45 | 42 | 44 | 43 | ||
INTT | 93 | 87 | 82 | 79 | 45 | 41 | 45 | 42 | 45 | 42 | 45 | 41 | 43 | 43 | ||
MAXT | 68 | 58 | 66 | 59 | 58 | 53 | 56 | 52 | 64 | 60 | 60 | 56 | 66 | 62 | ||
MINT | 68 | 57 | 66 | 59 | 56 | 52 | 57 | 53 | 65 | 61 | 61 | 56 | 66 | 62 | ||
DIMT | 103 | 83 | 95 | 80 | 97 | 85 | 88 | 76 | 65 | 61 | 95 | 82 | 66 | 63 | ||
MODT | 242 | 222 | 183 | 165 | 108 | 99 | 112 | 103 | 114 | 101 | 112 | 100 | 117 | 106 | ||
SIGNT | 115 | 95 | 108 | 93 | 137 | 124 | 132 | 120 | 55 | 42 | 139 | 125 | 53 | 44 | ||
SINT | 258 | 247 | 196 | 186 | ||||||||||||
SINDT | 222 | 210 | 172 | 163 | ||||||||||||
COST | 198 | 194 | 151 | 147 | ||||||||||||
COSDT | 245 | 232 | 202 | 192 | ||||||||||||
TANT | 370 | 360 | 273 | 265 | ||||||||||||
TANDT | 343 | 333 | 265 | 258 | ||||||||||||
ASINT | 255 | 248 | 206 | 202 | ||||||||||||
ASNDT | 258 | 253 | 206 | 202 | ||||||||||||
ACOST | 270 | 265 | 216 | 210 | ||||||||||||
ACSDT | 273 | 270 | 218 | 212 | ||||||||||||
ATANT | 167 | 162 | 125 | 121 | ||||||||||||
ATNDT | 170 | 163 | 125 | 120 | ||||||||||||
ATN2T | 232 | 218 | 194 | 180 | ||||||||||||
AT2DT | 235 | 222 | 192 | 178 | ||||||||||||
SINHT | 196 | 182 | 167 | 155 | ||||||||||||
COSHT | 255 | 238 | 212 | 198 | ||||||||||||
TANHT | 247 | 237 | 170 | 163 | ||||||||||||
T | F | T | F | T | F | T | F | T | F | T | F | T | F
| |||
| D | R | I | W | UW | B | UB
| |||||||||
ADDT | 21 | 10.6 | 16.6 | 8.6 | 11.2 | 6.6 | 11.7 | 6.3 | 17.0 | 12.8 | 11.4 | 6.8 | 19.4 | 14.8 | ||
SUBT | 21 | 10.6 | 16.6 | 8.6 | 11.2 | 6.6 | 11.7 | 6.3 | 17.1 | 12.8 | 11.5 | 6.8 | 19.3 | 14.8 | ||
MULT | 23 | 12.2 | 17.4 | 9.3 | 15.2 | 10.6 | 16.5 | 11.1 | 21 | 17.0 | 15.1 | 10.1 | 25 | 20 | ||
DIVT | 25 | 14.5 | 18.4 | 10.4 | 25 | 21 | 26 | 22 | 32 | 28 | 26 | 22 | 32 | 28 | ||
IDVT | 77 | 68 | 66 | 56 | 18.7 | 13.9 | 20 | 14.9 | 24 | 20 | 16.7 | 12.1 | 28 | 23 | ||
PWRT | 343 | 337 | 224 | 208 | 66 | 60 | 74 | 63 | 70 | 65 | 66 | 63 | 69 | 69 | ||
NEGT | 10.7 | 6.1 | 8.3 | 4.8 | 8.1 | 7.5 | 8.1 | 7.5 | 13.0 | 10.8 | 8.1 | 7.4 | 13.8 | 11.8 | ||
SQRTT | 78 | 72 | 72 | 67 | 78 | 73 | 77 | 74 | 76 | 74 | 80 | 74 | 76 | 77 | ||
LOGT | 143 | 137 | 93 | 90 | 100 | 95 | 98 | 96 | 100 | 97 | 101 | 96 | 101 | 98 | ||
LG10T | 155 | 148 | 100 | 97 | 108 | 102 | 107 | 104 | 107 | 104 | 108 | 103 | 108 | 106 | ||
EXPT | 130 | 125 | 96 | 93 | 101 | 100 | 102 | 101 | 108 | 106 | 102 | 101 | 108 | 107 | ||
ABST | 11.0 | 6.5 | 7.7 | 4.4 | 9.2 | 8.6 | 9.1 | 8.6 | 5.4 | 3.7 | 11.0 | 10.4 | 5.3 | 3.8 | ||
NINTT | 80 | 74 | 72 | 63 | 5.4 | 3.8 | 5.4 | 3.8 | 5.4 | 3.8 | 5.4 | 3.8 | 5.4 | 3.7 | ||
INTT | 53 | 48 | 47 | 43 | 5.4 | 3.8 | 5.4 | 3.8 | 5.4 | 3.8 | 5.4 | 3.8 | 5.4 | 3.8 | ||
MAXT | 20 | 11.8 | 14.3 | 8.3 | 9.0 | 6.2 | 8.9 | 6.3 | 15.1 | 12.6 | 11.1 | 8.5 | 17.0 | 14.4 | ||
MINT | 20 | 11.6 | 14.9 | 8.5 | 9.6 | 6.5 | 9.5 | 6.5 | 15.4 | 13.4 | 11.3 | 9.1 | 17.6 | 14.8 | ||
DIMT | 22 | 13.8 | 16.8 | 10.6 | 12.3 | 9.3 | 12.8 | 8.8 | 15.7 | 13.2 | 13.6 | 12.1 | 17.8 | 15.0 | ||
MODT | 185 | 172 | 120 | 110 | 27 | 24 | 28 | 26 | 33 | 29 | 31 | 29 | 38 | 35 | ||
SIGNT | 77 | 66 | 72 | 55 | 71 | 66 | 60 | 56 | 7.5 | 3.8 | 73 | 69 | 7.5 | 3.8 | ||
SINT | 182 | 178 | 122 | 126 | ||||||||||||
SINDT | 147 | 143 | 101 | 103 | ||||||||||||
COST | 158 | 155 | 112 | 109 | ||||||||||||
COSDT | 170 | 165 | 130 | 133 | ||||||||||||
TANT | 297 | 293 | 200 | 202 | ||||||||||||
TANDT | 267 | 263 | 192 | 198 | ||||||||||||
ASINT | 212 | 206 | 165 | 165 | ||||||||||||
ASNDT | 213 | 210 | 165 | 165 | ||||||||||||
ACOST | 225 | 222 | 173 | 172 | ||||||||||||
ACSDT | 228 | 225 | 175 | 175 | ||||||||||||
ATANT | 124 | 121 | 85 | 82 | ||||||||||||
ATNDT | 129 | 124 | 85 | 82 | ||||||||||||
ATN2T | 192 | 178 | 150 | 134 | ||||||||||||
AT2DT | 194 | 180 | 149 | 134 | ||||||||||||
SINHT | 126 | 129 | 104 | 105 | ||||||||||||
COSHT | 190 | 183 | 149 | 140 | ||||||||||||
TANHT | 206 | 194 | 137 | 137 | ||||||||||||
T | F | T | F | T | F | T | F | T | F | T | F | T | F
| |||
| D | R | I | W | UW | B | UB
| ||
ADDT | 8.5 | 6.4 | 4.5 | 4.4 | 10.6 | 4.0 | 12.1 | ||
SUBT | 8.4 | 6.5 | 4.5 | 4.4 | 10.6 | 3.9 | 12.1 | ||
MULT | 10.3 | 7.2 | 8.6 | 9.2 | 14.8 | 7.4 | 17.2 | ||
DIVT | 12.6 | 8.4 | 18.6 | 19.2 | 25 | 18.8 | 25 | ||
IDVT | 65 | 55 | 11.5 | 13.2 | 17.8 | 9.2 | 21 | ||
PWRT | 335 | 213 | 60 | 62 | 66 | 60 | 67 | ||
NEGT | 5.2 | 4.4 | 3.5 | 3.5 | 9.4 | 3.1 | 10.1 | ||
SQRTT | 73 | 68 | 73 | 74 | 75 | 72 | 73 | ||
LOGT | 143 | 90 | 96 | 97 | 96 | 94 | 95 | ||
LG10T | 154 | 97 | 102 | 103 | 104 | 102 | 103 | ||
EXPT | 122 | 92 | 97 | 98 | 102 | 93 | 100 | ||
ABST | 6.6 | 4.2 | 4.4 | 4.4 | 0.6 | 5.6 | 0.3 | ||
NINTT | 86 | 72 | 1.1 | 0.5 | 0.5 | 0.3 | 0.3 | ||
INTT | 51 | 44 | 1.1 | 0.5 | 0.5 | 0.3 | 0.3 | ||
MAXT | 11.2 | 8.1 | 6.3 | 6.1 | 11.6 | 7.0 | 13.3 | ||
MINT | 10.5 | 8.1 | 6.3 | 6.3 | 12.1 | 7.2 | 13.7 | ||
DIMT | 10.4 | 7.9 | 6.4 | 6.1 | 12.4 | 7.5 | 13.9 | ||
MODT | 178 | 112 | 20 | 22 | 27 | 25 | 31 | ||
SIGNT | 74 | 72 | 73 | 69 | 18.4 | 69 | 18.4 | ||
SINT | 176 | 118 | |||||||
SINDT | 140 | 95 | |||||||
COST | 154 | 110 | |||||||
COSDT | 162 | 124 | |||||||
TANT | 291 | 195 | |||||||
TANDT | 264 | 186 | |||||||
ASINT | 198 | 158 | |||||||
ASNDT | 201 | 157 | |||||||
ACOST | 214 | 166 | |||||||
ACSDT | 218 | 167 | |||||||
ATANT | 120 | 84 | |||||||
ATNDT | 124 | 84 | |||||||
ATN2T | 184 | 142 | |||||||
AT2DT | 185 | 140 | |||||||
SINHT | 127 | 98 | |||||||
COSHT | 180 | 140 | |||||||
TANHT | 210 | 130 | |||||||
| D | R | I | W | UW | B | UB
| |||||||||
DTOT | 35 | 45 | 83 | 72 | 86 | 73 | 87 | 75 | 92 | 79 | 88 | 75 | 97 | 86 | ||
RTOT | 50 | 49 | 33 | 33 | 84 | 74 | 84 | 74 | 93 | 86 | 84 | 74 | 93 | 83 | ||
ITOT | 49 | 51 | 49 | 44 | 33 | 33 | 80 | 71 | 87 | 79 | 79 | 72 | 87 | 79 | ||
WTOT | 49 | 51 | 48 | 44 | 45 | 42 | 33 | 33 | 90 | 84 | 80 | 71 | 86 | 77 | ||
UWTOT | 50 | 51 | 48 | 45 | 45 | 41 | 84 | 79 | 33 | 33 | 79 | 72 | 87 | 79 | ||
BTOT | 50 | 46 | 48 | 44 | 45 | 42 | 45 | 42 | 89 | 83 | 32 | 33 | 87 | 80 | ||
UBTOT | 50 | 46 | 48 | 45 | 45 | 41 | 46 | 42 | 45 | 41 | 81 | 72 | 26 | 26 | ||
T | F | T | F | T | F | T | F | T | F | T | F | T | F
| |||
| D | R | I | W | UW | B | UB
| |||||||||
DTOT | 2.4 | 2.2 | 12.6 | 8.0 | 14.7 | 9.6 | 15.6 | 9.8 | 21 | 15.8 | 15.6 | 10.0 | 21 | 16.4 | ||
RTOT | 9.1 | 5.2 | 1.2 | 1.2 | 12.4 | 8.4 | 13.3 | 9.3 | 18.5 | 14.1 | 13.4 | 9.2 | 18.8 | 15.6 | ||
ITOT | 9.0 | 6.8 | 8.5 | 6.3 | 1.2 | 1.2 | 8.2 | 6.8 | 13.4 | 11.6 | 8.2 | 6.5 | 13.9 | 12.0 | ||
WTOT | 9.1 | 6.8 | 8.4 | 6.3 | 5.8 | 3.6 | 0.6 | 0.7 | 14.2 | 11.8 | 8.0 | 6.5 | 13.4 | 11.1 | ||
UWTOT | 9.5 | 7.3 | 9.0 | 6.6 | 5.4 | 3.2 | 8.5 | 6.6 | 0.7 | 0.6 | 8.9 | 6.3 | 14.3 | 12.6 | ||
BTOT | 9.1 | 6.8 | 8.5 | 6.1 | 5.8 | 3.6 | 5.8 | 3.5 | 14.2 | 11.6 | 0.4 | 0.4 | 13.6 | 11.8 | ||
UBTOT | 9.5 | 7.3 | 9.0 | 6.7 | 5.4 | 3.2 | 6.5 | 4.2 | 5.3 | 3.2 | 8.9 | 6.3 | 0.4 | 0.4 | ||
T | F | T | F | T | F | T | F | T | F | T | F | T | F
| |||
| D | R | I | W | UW | B | UB
| ||
DTOT | 2.2 | 5.4 | 6.6 | 7.6 | 12.6 | 7.6 | 13.3 | ||
RTOT | 5.1 | 1.1 | 6.2 | 6.9 | 12.0 | 7.0 | 12.7 | ||
ITOT | 6.9 | 6.4 | 1.1 | 3.7 | 9.1 | 3.7 | 9.4 | ||
WTOT | 6.7 | 6.2 | 3.5 | 0.5 | 9.7 | 3.7 | 8.8 | ||
UWTOT | 7.1 | 6.7 | 3.1 | 4.0 | 0.5 | 4.1 | 9.9 | ||
BTOT | 6.9 | 6.1 | 3.5 | 3.5 | 9.4 | 0.3 | 9.4 | ||
UBTOT | 7.1 | 6.7 | 3.1 | 4.1 | 3.1 | 3.9 | 0.3 | ||