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

calling non-existing methods with try() is very slow #6386

Closed
p6rt opened this issue Jul 8, 2017 · 3 comments
Closed

calling non-existing methods with try() is very slow #6386

p6rt opened this issue Jul 8, 2017 · 3 comments
Labels
perf regression Issue did not exist previously

Comments

@p6rt
Copy link

p6rt commented Jul 8, 2017

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

Searchable as RT131721$

@p6rt
Copy link
Author

p6rt commented Jul 8, 2017

From shoichikaji@gmail.com

I've noticed that with recent rakudo (2017.06-172-gc76d9324a),
it takes a lot of time to call non-existing methods with try().

(You can also find the following code in
https://gist.github.com/skaji/b597ec5ecef28449527bb746ab53bd30 )

```
#!/usr/bin/env perl6
use v6;

class Foo { }

my $start = now;

for ^30 {
  try Foo.not-exists;
}

printf "Took %.3f sec\n", now - $start;
```

rakudo 2017.04 ---> 0.004 sec
```
❯ ~/env/rakudobrew/moar-2017.04/install/bin/perl6 -v
This is Rakudo version 2017.04 built on MoarVM version 2017.04
implementing Perl 6.c.
❯ ~/env/rakudobrew/moar-2017.04/install/bin/perl6 test.p6
Took 0.004 sec
```

rakudo 2017.06-172-gc76d9324a ---> 4.903 sec
```
❯ ~/env/rakudobrew/moar-nom/install/bin/perl6 -v
This is Rakudo version 2017.06-172-gc76d9324a built on MoarVM version
2017.06-43-g45b008fb
implementing Perl 6.c.
❯ ~/env/rakudobrew/moar-nom/install/bin/perl6 test.p6
Took 4.903 sec
```

Please note that​:
* for ^30 { try die; } is not slow.
* ugexe pointed out that Foo.?not-exists; is still fast it seems though

@p6rt
Copy link
Author

p6rt commented Jul 8, 2017

From @MasterDuke17

Fixed in rakudo/rakudo#1109

@p6rt p6rt closed this as completed Jul 8, 2017
@p6rt
Copy link
Author

p6rt commented Jul 8, 2017

@MasterDuke17 - Status changed from 'new' to 'resolved'

@p6rt p6rt added perf regression Issue did not exist previously labels Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf regression Issue did not exist previously
Projects
None yet
Development

No branches or pull requests

1 participant