Mac::Carbon Profiling: Panther is Faster
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.
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.
$ time perl -MMac::Glue -e 'Mac::Glue->new("Finder")->activate'The second is Mac OS X 10.3.2.
real 0m21.445s
user 0m7.100s
sys 0m0.510s
$ time perl -MMac::Carbon -e1
real 0m19.885s
user 0m6.810s
sys 0m0.220s
$ time perl -MMac::Glue -e 'Mac::Glue->new("Finder")->activate'Wow. That's pretty dramatic. More than 10x faster in real, and about 5x faster in user+sys. Why the speedup?
real 0m2.067s
user 0m1.430s
sys 0m0.320s
$ time perl -MMac::Carbon -e1
real 0m1.300s
user 0m1.130s
sys 0m0.140s
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
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.
Leave a comment