G
George Potemkin
Guest
> some other factors that will affect the result In the limited tests that I was able to run these factors seemed to affect the absolutely different operations in equal degree - from the parsing db logs to the latch lock durations. To predict the time of these operations it turned out to be enough to compare the speed of the DO loop running on two boxes. Accuracy of the prediction is 10-20% but it's enough for my tasks. > does expr $n -1 create subprocess on your system? No. After the 'while do' loop 'echo $n' shows the zero value. If the 'while do' loop would create a subprocess then I would see the value assigned before the loop. > fyi, in bash, you can do n=$(( $n - 1 )) which is perhaps quicker. It's indeed 100 times faster than 'expr'.
Continue reading...
Continue reading...