Profiling "Hello, World!" in PIR

chromatic chromatic at wgz.org
Tue Nov 25 08:16:32 UTC 2008


I profiled this PIR program:

.sub 'main' :main
	say 'Hello, world!'
.end

This costs 28,773,062 instructions, as measured by Callgrind.  2/3 of those 
are dynloader relocations (we export a lot of symbols).

24.4% of the instructions go to creating the first new Interpreter.  20.75% of 
the instructions go toward global initialization.

11% of the instructions go to installing default MMD functions (mostly from 
vtables -- a third of those are in the BigInt and Integer PMCs).

We call pmc_new 1,420 times.  21.54% of those times are from 
Parrot_create_mro() and 20.97% of those times are from 
register_raw_nci_method_in_ns().

We make 2,875 STRINGs.

IMCC takes up 4.71% of the instructions.  4.07% of total instructions occur in 
and during calls to the is_op() function (especially hop_init()).

BigInt is the most expensive PMC to initialize; it represents 3.54% of all 
instructions executed, thanks to all of its MMD functions.

-- c


More information about the parrot-dev mailing list