Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

efficiency



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