Michael G Schwern wrote:
> It does add significant overhead. Here's the example of one of
> Regexp::Common's tests.
>
> 0 windhund /private/var/local/cpan_shell/build/Regexp-Common-2.120$ time perl
> -Ilib ~/tmp/strip_ok t/number/integer.t
> 1..23534
>
> real 0m4.882s
> user 0m5.469s
> sys 0m0.155s
> 0 windhund /private/var/local/cpan_shell/build/Regexp-Common-2.120$ time perl
> -Ilib t/number/integer.t > /dev/null
>
> real 0m2.051s
> user 0m2.020s
> sys 0m0.018s
>
> TAPx::Parser has not yet been optimized so some profiling information would
> likely prove interesting. I would much rather improve the parser than change
> the protocol.
A Devel::DProf run of the above is attached. I don't trust the times but I do
trust the counts. Here's the top routines to get an idea...
Total Elapsed Time = 4.270165 Seconds
User+System Time = 0 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
0.00 1.300 3.318 100001 0.0000 0.0000 TAPx::Parser::Streamed::_lex
0.00 1.279 1.268 100000 0.0000 0.0000 TAPx::Parser::_aggregate_results
0.00 0.910 1.129 100000 0.0000 0.0000
TAPx::Parser::Grammar::_make_test_token
0.00 0.889 2.277 900025 0.0000 0.0000 TAPx::Parser::__ANON__
0.00 0.700 0.700 100001 0.0000 0.0000 TAPx::Parser::Iterator::FH::next
0.00 0.600 1.729 100001 0.0000 0.0000 TAPx::Parser::Grammar::__ANON__
0.00 0.340 0.340 100001 0.0000 0.0000 TAPx::Parser::Results::new
0.00 0.220 0.220 500000 0.0000 0.0000 TAPx::Parser::Grammar::_trim
0.00 0.180 0.180 200000 0.0000 0.0000
TAPx::Parser::Results::Test::is_actual_ok
0.00 0.170 0.170 200002 0.0000 0.0000 TAPx::Parser::Results::type
0.00 0.160 1.927 100001 0.0000 0.0000 TAPx::Parser::_validate
0.00 0.110 0.110 100004 0.0000 0.0000 TAPx::Parser::Grammar::syntax_for
0.00 0.100 0.040 100000 0.0000 0.0000 TAPx::Parser::_check_ending_plan
0.00 0.100 0.100 500000 0.0000 0.0000
TAPx::Parser::Results::Test::has_todo
0.00 0.090 0.090 100001 0.0000 0.0000
TAPx::Parser::Iterator::FH::is_first
0.00 0.080 0.080 300003 0.0000 0.0000 TAPx::Parser::Results::Test::number
0.00 0.050 0.050 100001 0.0000 0.0000 TAPx::Parser::Grammar::token_types
0.00 0.040 0.010 100000 0.0000 0.0000
TAPx::Parser::Results::Test::todo_failed
0.00 0.020 0.020 100000 0.0000 0.0000
TAPx::Parser::Results::Test::has_skip
0.00 0.020 0.020 100001 0.0000 0.0000 TAPx::Parser::Grammar::handler_for
0.00 0.010 0.010 9 0.0011 0.0011 TAPx::Parser::Results::BEGIN
0.00 0.010 0.018 9 0.0011 0.0020 TAPx::Parser::BEGIN
dproff.out
Description: Binary data
|