]> Sergey Matveev's repositories - public-inbox.git/commit
treewide: avoid `goto &NAME' for tail recursion
authorEric Wong <e@80x24.org>
Fri, 11 Sep 2020 07:32:31 +0000 (07:32 +0000)
committerEric Wong <e@80x24.org>
Sat, 12 Sep 2020 20:29:11 +0000 (20:29 +0000)
commitd11feea98718f2abb109af4216a36bdbd21b7191
tree1f6f83caf21d52f61524e935fa53dcbb6f789877
parent0a1e15ad863782650a36025b9d52a6e9de5eadf3
treewide: avoid `goto &NAME' for tail recursion

While Perl implements tail recursion via `goto' which allows
avoiding warnings on deep recursion.  It doesn't (as of 5.28)
optimize the speed of such dispatches, though it may reduce
ephemeral memory usage.

Make the code less alien to hackers coming from other languages
by using normal subroutine dispatch.  It's actually slightly
faster in micro benchmarks due to the complexity of `goto &NAME'.
lib/PublicInbox/DS.pm
lib/PublicInbox/Eml.pm
lib/PublicInbox/ExtMsg.pm
lib/PublicInbox/SolverGit.pm
lib/PublicInbox/V2Writable.pm
lib/PublicInbox/View.pm
lib/PublicInbox/Watch.pm