use Time::HiRes qw(time); use Inline C => Config => #OPTIMIZE => '-O0', FORCE_BUILD => 1; use Inline C => <<'EOC'; void foo() {} void foo_bar(int x) { int i; for(i = 0; i < x; i++){ foo(); } } EOC $iterations = 10000000; $t = time; foo() for 1 .. $iterations; print "# ", time - $t, "\n"; $t = time; foo_bar($iterations); print "# ", time - $t, "\n";