Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move Mu.item to builtins/Mu.pir; results in 8%+ overall speed improve…
…ment.
  • Loading branch information
pmichaud committed May 15, 2011
1 parent be887ad commit 631085c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions src/builtins/Mu.pir
Expand Up @@ -85,6 +85,15 @@ like this.
.return ($P0)
.end
=item item()
=cut
.sub 'item' :method
x_enter_sublog
.return (self)
.end
=back
=head2 Object constructor methods
Expand Down
10 changes: 5 additions & 5 deletions src/core/Mu.pm
@@ -1,12 +1,12 @@
subset Matcher of Mu where { .^can('ACCEPTS') };

augment class Mu {
method Bool { $.defined }
# methods defined in src/builtins/Mu.pir
# for performance or bootstrap reasons
# method item { self; }

method item {
# This is overridden by non-items.
self;
}

method Bool { $.defined }

multi method notdef() {
die ".notdef is deprecated, please use negated .defined instead";
Expand Down

0 comments on commit 631085c

Please sign in to comment.