From: botp Date: 2012-02-04T10:36:44+09:00 Subject: Re: Basic Ruby performance On Sat, Feb 4, 2012 at 12:27 AM, Dave Aronson wrote: > On Thu, Feb 2, 2012 at 23:03, botp wrote: > >>> (3..8).each do |x| >>> t=Time.now();for a in 0..10**x;end; puts("#{x}  #{Time.now()-t}") >>> end >> >> 3  0.000142406 >> 4  0.001344933 >> 5  0.014539207 >> 6  0.076141941 >> 7  0.737979205 >> 8  7.359555691 > > Ummmm... yeah... every time you tell it to do ten times as many loops, > it takes almost ten times as long.  What's so surprising? i noticed the mult 10 too late. what i was emphasizing is that, given the simple loop above, your point of acceptance should be less than 10**7. otherwise, beyond that, you' d get unacceptable response time. just imagine, 7 seconds! this would not be acceptable for database apps for example w response times of less than 5 seconds. kind regards -botp