Hi all, since it's the first time you hear from me I'll try to give a (very) short intro.
Nadim, 35, programs in perl, C++, C, VB, Flex, lua, ..., Interested in: languages, editors, IDE, tools, ... I had some contact with Ingy but he seems quite impossible to reach him these days. I have an Inline ::Flex working (version 01) is someone intressted ? I plan an Inline::Byacc, Inline::Yacc Inline::Lemon Problems : There is a big problem with inline, SPEED. The main problem is the use of Parse::Recdescent. Here is a profiling for a small lexer (C source 90 KB, generated from 14 regular expressions) on a 500 MHz PC I timed the inlining process to 1:40 dprofpp.bat -O 50 Total Elapsed Time = -4.26418 Seconds User+System Time = 75.71027 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 24.3 18.40 18.006 81472 0.0002 0.0002 Parse::RecDescent::Expectation::at 16.8 12.78 17.325 3349 0.0038 0.0052 Parse::RecDescent::namespace000001::modifier 10.2 7.763 10.613 4760 0.0016 0.0022 Parse::RecDescent::namespace000001::TYPE 9.05 6.851 9.136 2452 0.0028 0.0037 Parse::RecDescent::namespace000001::comment 6.94 5.255 45.171 4735 0.0011 0.0095 Parse::RecDescent::namespace000001::rtype 6.91 5.230 77.305 2452 0.0021 0.0315 Parse::RecDescent::namespace000001::part 6.84 5.176 103.31 4762 0.0011 0.0217 Parse::RecDescent::_parserepeat 6.46 4.889 6.412 2367 0.0021 0.0027 Parse::RecDescent::namespace000001::anything_else 3.40 2.575 4.851 26450 0.0001 0.0002 Parse::RecDescent::Rule::expected 2.96 2.242 26.293 2367 0.0009 0.0111 Parse::RecDescent::namespace000001::function_declaration 2.51 1.897 26.349 2368 0.0008 0.0111 Parse::RecDescent::namespace000001::function_definition 1.89 1.429 1.925 47741 0.0000 0.0000 Parse::RecDescent::Production::expected 1.87 1.415 2.203 1439 0.0010 0.0015 Parse::RecDescent::namespace000001::star 1.57 1.192 0.954 47788 0.0000 0.0000 Parse::RecDescent::Rule::_contains 1.57 1.190 0.952 47780 0.0000 0.0000 Parse::RecDescent::Expectation::is 1.39 1.051 0.920 26450 0.0000 0.0000 Parse::RecDescent::Expectation::new 1.20 0.910 0.778 26450 0.0000 0.0000 Parse::RecDescent::LineCounter::TIESCALAR 0.93 0.702 0.511 38230 0.0000 0.0000 Parse::RecDescent::Expectation::failed 0.66 0.500 0.403 19383 0.0000 0.0000 Parse::RecDescent::Subrule::describe 0.45 0.339 0.659 1 0.3386 0.6589 Parse::RecDescent::_generate 0.42 0.320 0.259 12166 0.0000 0.0000 Parse::RecDescent::Token::describe 0.31 0.231 0.173 11571 0.0000 0.0000 Parse::RecDescent::Literal::describe 0.25 0.188 0.494 668 0.0003 0.0007 Text::Balanced::_match_codeblock 0.24 0.179 0.220 110 0.0016 0.0020 Parse::RecDescent::namespace000001::IDENTIFIER 0.21 0.160 0.136 4809 0.0000 0.0000 Parse::RecDescent::Repetition::describe 0.19 0.141 0.859 1 0.1409 0.8595 Inline::C::get_parser 0.13 0.100 0.100 1 0.1000 0.0999 Inline::Flex::GenerateLexer 0.09 0.070 0.089 11 0.0064 0.0081 Inline::BEGIN 0.08 0.060 0.059 106 0.0006 0.0006 Inline::C::BEGIN 0.08 0.060 79.805 1 0.0599 79.804 Inline::glue 0.07 0.050 0.049 7 0.0071 0.0070 FindBin::BEGIN 0.05 0.040 0.040 4 0.0100 0.0099 Inline::Flex::BEGIN 0.05 0.040 0.036 284 0.0001 0.0001 Text::Balanced::_match_quotelike 0.05 0.040 79.944 4 0.0100 19.986 main::BEGIN 0.05 0.040 0.205 494 0.0001 0.0004 Text::Balanced::_match_variable 0.04 0.030 0.030 18 0.0017 0.0017 AutoLoader::AUTOLOAD 0.04 0.030 0.024 1190 0.0000 0.0000 Text::Balanced::_failmsg 0.04 0.030 0.030 70 0.0004 0.0004 Parse::RecDescent::Production::hasleftmost 0.04 0.030 0.079 9 0.0033 0.0088 Inline::_rmtree 0.04 0.029 0.028 1 0.0290 0.0276 Inline::C::get_types 0.03 0.020 0.020 1 0.0200 0.0200 Inline::C::fix_make 0.03 0.020 0.030 1 0.0199 0.0297 Inline::check_installed 0.03 0.020 0.033 12 0.0017 0.0027 Parse::RecDescent::namespace000001::arg_decl 0.01 0.010 0.010 89 0.0001 0.0001 Parse::RecDescent::_linecount 0.01 0.010 0.010 24 0.0004 0.0004 Parse::RecDescent::Rule::addprod 0.01 0.010 0.010 3 0.0033 0.0033 Exporter::export 0.01 0.010 0.010 2 0.0050 0.0050 Inline::mkpath 0.01 0.010 0.009 84 0.0001 0.0001 Parse::RecDescent::_parse 0.01 0.010 0.009 82 0.0001 0.0001 Parse::RecDescent::Production::leftmostsubrule 0.01 0.010 0.010 1 0.0100 0.0100 warnings::BEGIN the first non Parse:: or Text:: is Inline::C::get_parser topping at 0.19 % of the time Code generation time (exclusive Parse::Recdescent) is only a few seconds. Does someone else think the same as I do ? I plan a major project with quite a lot of inling but I can't afford 1 hour compiling. This is, I think, the major problem inline (C and C++) have. I still use XS in another project because of that. PS. Parese::Recdescent Is cool (I use too) but maybe not in Inline. Nadim Khemir Senior Software Engineer Tel : +46 (0) 46-540 10 95 Mobile : +46 (0) 733-45 10 95 E-mail : [EMAIL PROTECTED] Internet : www.cpen.com C Technologies AB Ideon Research Park Scheelev�gen 15, SE-223 70 Lund Sweden
