From: "Daniel P. Zepeda" Date: 2003-01-30T05:27:59+09:00 Subject: Re: OT - Re: Local variables & blocks On Thu, 30 Jan 2003 02:27:11 +0900 ahoward wrote: > On Thu, 30 Jan 2003, Paul Brannan wrote: > > > On Thu, Jan 30, 2003 at 12:46:27AM +0900, ahoward wrote: > > > elimnating methods is _very_ important to keep things fast too, not just > > > to keep them readable. > > > > From what I've seen, the Ruby Way to make things fast seems to be to > > rewrite it in C. The C compiler can do inlining that the Ruby > > interpreter cannot. > > you are obviously correct. however, i wrote a decoder recently which decoded > some largish text weather data. it took around 30 seconds to run - which was > actually acceptable. i decided to profile it, in 5 minutes i changed two > offending lines, and now it runs in under 1 sec. my c++ version takes 3 > seconds. i think profiling is key with languages like ruby and perl. > > -a Profiling is important in any language. Have you profiled your C++ code? I'll bet there's an offending line or two in there as well. > > -- > > ==================================== > | Ara Howard > | NOAA Forecast Systems Laboratory > | Information and Technology Services > | Data Systems Group > | R/FST 325 Broadway > | Boulder, CO 80305-3328 > | Email: ahoward@fsl.noaa.gov > | Phone: 303-497-7238 > | Fax: 303-497-7259 > ==================================== > -- "Daniel P. Zepeda" (Remove commas for address)