Permalink
Browse files

[Buf] remove append_inplace hack; ordinary concatenation performs nea…

…rly equally well, so this was a case of premature optimization. Go figure.
  • Loading branch information...
1 parent 8943be1 commit 943dcd1fcef63945617a7b986dd716f14a140ebe @moritz moritz committed Sep 22, 2011
Showing with 0 additions and 12 deletions.
  1. +0 −12 src/core/Buf.pm
View
@@ -49,18 +49,6 @@ class Buf does Positional {
nqp::unbox_s $encoding.lc
);
}
-
- # append_inplace is a big hack, but seems to be necessary
- # performance wise for reading binary data in chunks
- method append_inplace(Buf:D: Buf:D $other) {
- my Mu $other_buf := nqp::getattr(pir::perl6_decontainerize__PP($other), Buf, '$!buffer');
- pir::set__vPs($!buffer, nqp::concat_s(
- $!buffer.get_string('binary'),
- $other_buf.get_string('binary')
- )
- );
- self;
- }
}
multi infix:<eqv>(Buf:D $a, Buf:D $b) {

0 comments on commit 943dcd1

Please sign in to comment.