From: Eric Wong Date: Sat, 25 Jan 2020 04:45:03 +0000 (+0000) Subject: linkify: compile $LINK_RE once X-Git-Tag: v1.3.0~53 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=f09b01e0e89dbdf0f0bd6bfae2f8545fa17657d2 linkify: compile $LINK_RE once This gives a 3-4% performance improvement in xt/perf-msgview.t with a mirror of https://public-inbox.org/meta/ --- diff --git a/lib/PublicInbox/Linkify.pm b/lib/PublicInbox/Linkify.pm index af9be3ff..77b94f56 100644 --- a/lib/PublicInbox/Linkify.pm +++ b/lib/PublicInbox/Linkify.pm @@ -70,7 +70,7 @@ sub linkify_1 { $_[0]->{$key} = $url; $beg . 'PI-LINK-'. $key . $end; - ^ge; + ^geo; $_[1]; }