From: "Bartosz DziewoƄski" Date: 2012-08-10T01:04:37+09:00 Subject: Re: Time-efficient program 2012/8/9 ajay paswan : > Suppose you are given a program, now you are given a task to minimize > the time, what will be your approach? > > and how will you measure the time needed? > I think if we can get total clock cycle by any mean, that could be the > best measure. If so, how can I get that? Use Unix's `time` or equivalent utility. Then profile (you can do it using ruby-prof gem.) -- Matma Rex