Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimizer has difficulty with long expressions #2792

Closed
p6rt opened this issue Jun 19, 2012 · 4 comments
Closed

optimizer has difficulty with long expressions #2792

p6rt opened this issue Jun 19, 2012 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 19, 2012

Migrated from rt.perl.org#113754 (status was 'resolved')

Searchable as RT113754$

@p6rt
Copy link
Author

p6rt commented Jun 19, 2012

From @pmichaud

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

@p6rt
Copy link
Author

p6rt commented Aug 26, 2015

From @coke

On Tue Jun 19 11​:51​:14 2012, pmichaud wrote​:

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

Current timings seem much better on MoarVM - can we close this ticket?

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Aug 26, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt closed this as completed Mar 12, 2016
@p6rt
Copy link
Author

p6rt commented Mar 12, 2016

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant