[Charlotte.PM] Help me tune this for speed

William McKee william at knowmad.com
Wed Jul 27 10:23:57 PDT 2005


On Wed, Jul 27, 2005 at 01:02:27PM -0400, William McKee wrote:
> Basically, it looks like most of the time in the script is spent in
> Math::Geometry::Planar. Even using Steven's version of the code, I still
> see much the same results. It looks like you need to look at ways to
> limit the calls to SegmentIntersection() or improve the algorithms in
> Math::Geometry::Planar::SegmentIntersection.

After a little more exploration, we realized that the first call to
SegmentIntersection is unnecessary. Removing that call dropped the
calculation time in half and similarly improved the profile output from
dprofpp.  Steven suggests looking at Ch 7 of _Perl Objects, References,
and Modules_. Our invoice is in the mail :).


Have fun,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com


More information about the charlotte mailing list