zsh-users
 help / color / mirror / code / Atom feed
* efficiency
@ 2017-02-04  2:55 Ray Andrews
  2017-02-04 15:05 ` efficiency Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Ray Andrews @ 2017-02-04  2:55 UTC (permalink / raw)
  To: Zsh Users

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?



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-04 18:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-04  2:55 efficiency Ray Andrews
2017-02-04 15:05 ` efficiency Peter Stephenson
2017-02-04 15:39   ` efficiency Ray Andrews
2017-02-04 15:47     ` efficiency Peter Stephenson
2017-02-04 16:38       ` efficiency Ray Andrews
2017-02-04 16:47         ` efficiency Peter Stephenson
2017-02-04 17:39           ` efficiency Ray Andrews

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).