Mac::Carbon Profiling: Panther is Faster

| | Comments (0)
Boy howdy, is it. The system is an iBook G3/600 with 256MB RAM. The first test is with Mac OS X 10.2.8.

$ time perl -MMac::Glue -e 'Mac::Glue->new("Finder")->activate'
real    0m21.445s
user    0m7.100s
sys     0m0.510s
 
$ time perl -MMac::Carbon -e1
real    0m19.885s
user    0m6.810s
sys     0m0.220s

The second is Mac OS X 10.3.2.

$ time perl -MMac::Glue -e 'Mac::Glue->new("Finder")->activate'
real    0m2.067s
user    0m1.430s
sys     0m0.320s
 
$ time perl -MMac::Carbon -e1
real    0m1.300s
user    0m1.130s
sys     0m0.140s

Wow. That's pretty dramatic. More than 10x faster in real, and about 5x faster in user+sys. Why the speedup?

The slowest thing with Mac::Carbon was always in loading the modules on startup, with most of the time spent in dyld. Over 90% of that time in the Mac::Glue test in Mac OS X 10.2.8 was spent in dyld. In the Mac OS X 10.3.2 version it is still over 75%, but, obviously, much less time is spent there.

Before, it was spending over half of its time in link_library_module and add_reference combined, and about 20% in relocate_symbol_pointers/relocate_symbol_pointers_ in_library_image. Now, it still spends about 20% in the latter, but the former don't show up at all. And that 20% is a lot less than in the original, since the total time is so much shorter.

I don't know what all that means exactly, but I do know that yeeha, Panther is a lot faster at loading in them shared libraries. use.perl.org

Leave a comment

<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Entry

This page contains a single entry by pudge published on January 13, 2004 12:53 AM.

Classic was the previous entry in this site.

Even More Lies is the next entry in this site.

Find recent content on the main index or look in the archives to find all content.