Skip to content

Commit

Permalink
Eradicate !=== from the setting
Browse files Browse the repository at this point in the history
For some reason a !=== a is 5x as slow as !(a === a)
  • Loading branch information
lizmat committed Jul 19, 2016
1 parent 649ff44 commit 6ef9e08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/core/Block.pm
Expand Up @@ -288,7 +288,7 @@ my class Block { # declared in BOOTSTRAP
}
$p;
}
if ($slurp_n and $slurp_n.capture and $slurp_n !=== $slurp_p) {
if ($slurp_n and $slurp_n.capture and !($slurp_n === $slurp_p)) {
@phash.push(strip_parm($slurp_n));
}
my $error = False;
Expand Down
5 changes: 2 additions & 3 deletions src/core/Stash.pm
Expand Up @@ -43,9 +43,8 @@ my class Stash { # declared in BOOTSTRAP
}

method merge-symbols(Stash:D: Hash $globalish) { # NQP gives a Hash, not a Stash
if $globalish !=== Stash {
nqp::gethllsym('perl6', 'ModuleLoader').merge_globals(self, $globalish);
}
nqp::gethllsym('perl6','ModuleLoader').merge_globals(self,$globalish)
unless $globalish === Stash;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/Supply.pm
Expand Up @@ -619,7 +619,7 @@ my class Supply {
method unique(Supply:D $self: :&as, :&with, :$expires) {
supply {
if $expires {
if &with and &with !=== &[===] {
if &with and !(&with === &[===]) {
my @seen; # really Mu, but doesn't work in settings
my Mu $target;
if &as {
Expand Down Expand Up @@ -686,7 +686,7 @@ my class Supply {
}
}
else { # !$!expires
if &with and &with !=== &[===] {
if &with and !(&with === &[===]) {
my @seen; # really Mu, but doesn't work in settings
my Mu $target;
if &as {
Expand Down

0 comments on commit 6ef9e08

Please sign in to comment.