[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Document m=1 m=2; echo $m result
From: |
alex xmb ratchev |
Subject: |
Re: Document m=1 m=2; echo $m result |
Date: |
Mon, 3 Jul 2023 18:11:09 +0200 |
On Mon, Jul 3, 2023, 18:01 Dennis Williamson <dennistwilliamson@gmail.com>
wrote:
>
>
> On Mon, Jul 3, 2023 at 10:32 AM alex xmb ratchev <fxmbsw7@gmail.com>
> wrote:
>
>>
>> i chain assignments , have impression its faster
>>
>> kre
>> >
>> >
>> >
>>
>
> Tests are better than impressions. Sometimes they match though.
>
> $ time for ((i = 0; i <= 1000000; i++)); do j=$i; k=$j; m=10;
> n=foobarbazqux; p=1000000; q=$n; r=$k; s=$i$j$k$m$n$p$q$r; done
>
> real 0m24.542s
> user 0m23.440s
> sys 0m0.199s
> $ time for ((i = 0; i <= 1000000; i++)); do j=$i k=$j m=10 n=foobarbazqux
> p=1000000 q=$n r=$k s=$i$j$k$m$n$p$q$r; done
>
> real 0m17.087s
> user 0m16.679s
> sys 0m0.129s
>
> But at about 8 microseconds per iteration I don't think it's enough of a
> difference to choose it for speed alone.
>
thats a like 30% or smth
enuff for me
i d be the fool typing nonsensly ; s
> --
> Visit serverfault.com to get your system administration questions
> answered.
>