From 3abd992da588f707e34b04e47583017c98fdb021 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 17 Jun 2025 00:13:35 +0000 Subject: [PATCH] ds: avoid ->method dispatch for `print' `->method' dispatches have always been slower than directly invoking Perl ops without `->', so favor the latter. --- lib/PublicInbox/DS.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2