Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
efficiency
- X-seq: zsh-users 22433
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: efficiency
- Date: Fri, 03 Feb 2017 18:55:53 -0800
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Gentlemen:
echo "\nSTOP TIMER. REAL RUNTIME: $((now-start)) MILISECONDS
($(((now-start)/60000)):${(l:2::0:)$(((now-start)/1000%60))}) $@"
integer -x base=$(((now-start)/1000))
echo "\nSTOP TIMER. REAL RUNTIME: $((now-start)) MILISECONDS
($(($base/60)):${(l:2::0:)$(($base%60))}) $@"
... is there any real advantage to the second line? Obviously I'm
trying to cut down on duplicate calculation, and in the real world it
hardly matters, but as a point of principal, which is better?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author