# New Ticket Created by  Patrick R. Michaud 
# Please include the string:  [perl #113754]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=113754 >


Refined from a case given by harmil++ on #perl6, the optimizer seems
to have problems with long expressions.

   pmichaud@kiwi:~/p6/rakudo$ cat z
   #!/bin/bash
   for size in 1 10 100 500 1000 10000; 
   do 
     code=$(./perl6 -e "say (1..$size).join('+')")
     time --format="Expression in input $size: %e" -- ./perl6 --stagestats 
--ll-exception -e "my \$x = $code;" || break; 
     echo
   done
   
   pmichaud@kiwi:~/p6/rakudo$ sh z
   Stage parse: 0.341
   Stage syntaxcheck: 0.000
   Stage past: 0.000
   Stage optimize: 0.001
   Stage post: 0.005
   Stage pir: 0.002
   Stage evalpmc: 0.002
   Expression in input 1: 0.44
   
   Stage parse: 0.415
   Stage syntaxcheck: 0.000
   Stage past: 0.000
   Stage optimize: 0.013
   Stage post: 0.007
   Stage pir: 0.002
   Stage evalpmc: 0.002
   Expression in input 10: 0.53
   
   Stage parse: 0.582
   Stage syntaxcheck: 0.000
   Stage past: 0.000
   Stage optimize: 0.203
   Stage post: 0.022
   Stage pir: 0.006
   Stage evalpmc: 0.003
   Expression in input 100: 0.91
   
   Stage parse: 1.392
   Stage syntaxcheck: 0.000
   Stage past: 0.000
   Stage optimize: 0.525
   Stage post: 0.094
   Stage pir: 0.069
   Stage evalpmc: 0.003
   Expression in input 500: 2.19
   
   Stage parse: 2.367
   Stage syntaxcheck: 0.000
   Stage past: 0.000
   Stage optimize: 1.208
   Stage post: 0.190
   Stage pir: 0.316
   Stage evalpmc: 0.005
   Expression in input 1000: 4.19
   
   Stage parse: 20.673
   Stage syntaxcheck: 0.000
   Stage past: 0.000
   Stage optimize: 69.954
   Stage post: 2.818
   Stage pir: 88.863
   Stage evalpmc: 0.046
   Expression in input 10000: 182.50
   
   pmichaud@kiwi:~/p6/rakudo$ 
   
Pm

Reply via email to