[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug/limitation in 'time'
From: |
Chris Down |
Subject: |
Re: Bug/limitation in 'time' |
Date: |
Sun, 17 Mar 2013 10:35:23 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 2013-03-16 19:33, Bruce Dawson wrote:
> Thanks -- good to know that there is a fast and POSIX compliant method of
> doing this. I should have included my optimized counting loop -- it's what
> we switched to when we realized that $(expr) was a problem. Here it is now:
>
> # This code performs quite well
> function BashCount() {
> i=$1
> while [ $i -gt 0 ]; do
> (( i-- ))
> done
> echo Just did $1 iterations using bash math
> }
> time BashCount 150000
For the record `function' and `((' are not POSIX.
Chris
- Re: Bug/limitation in 'time', (continued)
- Re: Bug/limitation in 'time', Chris Down, 2013/03/17
- Re: Bug/limitation in 'time', Linda Walsh, 2013/03/17
- RE: Bug/limitation in 'time', Bruce Dawson, 2013/03/18
- RE: Bug/limitation in 'time', Chris F.A. Johnson, 2013/03/18
- Re: Bug/limitation in 'time', Jonathan Nieder, 2013/03/18
- Re: Bug/limitation in 'time', Linda Walsh, 2013/03/18
- Re: Bug/limitation in 'time', Chris Down, 2013/03/18
- Re: Bug/limitation in 'time', Linda Walsh, 2013/03/18
Re: Bug/limitation in 'time', Chris F.A. Johnson, 2013/03/17
- RE: Bug/limitation in 'time', Bruce Dawson, 2013/03/16
- Re: Bug/limitation in 'time',
Chris Down <=
- Re: Bug/limitation in 'time', Pierre Gaston, 2013/03/17
- RE: Bug/limitation in 'time', Bruce Dawson, 2013/03/17
- Re: Bug/limitation in 'time', Pierre Gaston, 2013/03/17
- Re: Bug/limitation in 'time', Bob Proulx, 2013/03/17
- Re: Bug/limitation in 'time', Pierre Gaston, 2013/03/17
Re: Bug/limitation in 'time', Hans J. Albertsson, 2013/03/17
Re: Bug/limitation in 'time', William Park, 2013/03/17
Re: Bug/limitation in 'time', Chris Down, 2013/03/17
Re: Bug/limitation in 'time', Chris F.A. Johnson, 2013/03/17
Re: Bug/limitation in 'time', Dan Douglas, 2013/03/17