From: Ant Sims Date: 2005-04-05T05:19:42+09:00 Subject: Re: Ruby optimization - re-implement in compiled language? On Mon, 04 Apr 2005 14:06:45 +0900, Aredridel wrote: >> The profiler identifies all the major bottlenecks as low level ruby >> methods (.each etc), so I'm considering re-implemented the guts of the >> dependency analysis in C++. I'm sure people here have done similar things, >> so I was wondering how beneficial it was for them? > > Each shows high in a profiler, because the entire contents of the inner > part of the loop count against it. Just so you're warned. That's really helpful to know. Thanks. Re-examining the profiler output it looks like most of the cost is doing GDBM lookups. By that time the keys are just strings so it looks like it's an issue with GDBM or, more likely, the way I'm using it (the .db files are quite small). Looks like a re-code in C++ is pointless. -- Ant Sims antsims9999@yahoo.co.uk