From: Eric Wong Date: Tue, 17 Jun 2025 00:13:35 +0000 (+0000) Subject: ds: avoid ->method dispatch for `print' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3abd992da588f707e34b04e47583017c98fdb021;p=thirdparty%2Fpublic-inbox.git ds: avoid ->method dispatch for `print' `->method' dispatches have always been slower than directly invoking Perl ops without `->', so favor the latter. --- diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index 38b363515..901e762b9 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -511,7 +511,7 @@ sub write { my $tmpio = $wbuf->[-1]; if (ref($tmpio) eq 'ARRAY' && !defined($tmpio->[2])) { # append to tmp file buffer - $tmpio->[0]->print($$bref) or + print { $tmpio->[0] } $$bref or return drop($self, "print: $!"); } else { $tmpio = tmpio $self, $bref, 0 or return 0;