1Memoize(3pm) Perl Programmers Reference Guide Memoize(3pm)
2
3
4
6 Memoize - Make functions faster by trading space for time
7
9 # This is the documentation for Memoize 1.03
10 use Memoize;
11 memoize('slow_function');
12 slow_function(arguments); # Is faster than it was before
13
14 This is normally all you need to know. However, many options are
15 available:
16
17 memoize(function, options...);
18
19 Options include:
20
21 NORMALIZER => function
22 INSTALL => new_name
23
24 SCALAR_CACHE => 'MEMORY'
25 SCALAR_CACHE => ['HASH', \%cache_hash ]
26 SCALAR_CACHE => 'FAULT'
27 SCALAR_CACHE => 'MERGE'
28
29 LIST_CACHE => 'MEMORY'
30 LIST_CACHE => ['HASH', \%cache_hash ]
31 LIST_CACHE => 'FAULT'
32 LIST_CACHE => 'MERGE'
33
35 `Memoizing' a function makes it faster by trading space for time. It
36 does this by caching the return values of the function in a table. If
37 you call the function again with the same arguments, "memoize" jumps in
38 and gives you the value out of the table, instead of letting the
39 function compute the value all over again.
40
41 Here is an extreme example. Consider the Fibonacci sequence, defined
42 by the following function:
43
44 # Compute Fibonacci numbers
45 sub fib {
46 my $n = shift;
47 return $n if $n < 2;
48 fib($n-1) + fib($n-2);
49 }
50
51 This function is very slow. Why? To compute fib(14), it first wants
52 to compute fib(13) and fib(12), and add the results. But to compute
53 fib(13), it first has to compute fib(12) and fib(11), and then it comes
54 back and computes fib(12) all over again even though the answer is the
55 same. And both of the times that it wants to compute fib(12), it has
56 to compute fib(11) from scratch, and then it has to do it again each
57 time it wants to compute fib(13). This function does so much
58 recomputing of old results that it takes a really long time to
59 run---fib(14) makes 1,200 extra recursive calls to itself, to compute
60 and recompute things that it already computed.
61
62 This function is a good candidate for memoization. If you memoize the
63 `fib' function above, it will compute fib(14) exactly once, the first
64 time it needs to, and then save the result in a table. Then if you ask
65 for fib(14) again, it gives you the result out of the table. While
66 computing fib(14), instead of computing fib(12) twice, it does it once;
67 the second time it needs the value it gets it from the table. It
68 doesn't compute fib(11) four times; it computes it once, getting it
69 from the table the next three times. Instead of making 1,200 recursive
70 calls to `fib', it makes 15. This makes the function about 150 times
71 faster.
72
73 You could do the memoization yourself, by rewriting the function, like
74 this:
75
76 # Compute Fibonacci numbers, memoized version
77 { my @fib;
78 sub fib {
79 my $n = shift;
80 return $fib[$n] if defined $fib[$n];
81 return $fib[$n] = $n if $n < 2;
82 $fib[$n] = fib($n-1) + fib($n-2);
83 }
84 }
85
86 Or you could use this module, like this:
87
88 use Memoize;
89 memoize('fib');
90
91 # Rest of the fib function just like the original version.
92
93 This makes it easy to turn memoizing on and off.
94
95 Here's an even simpler example: I wrote a simple ray tracer; the
96 program would look in a certain direction, figure out what it was
97 looking at, and then convert the `color' value (typically a string like
98 `red') of that object to a red, green, and blue pixel value, like this:
99
100 for ($direction = 0; $direction < 300; $direction++) {
101 # Figure out which object is in direction $direction
102 $color = $object->{color};
103 ($r, $g, $b) = @{&ColorToRGB($color)};
104 ...
105 }
106
107 Since there are relatively few objects in a picture, there are only a
108 few colors, which get looked up over and over again. Memoizing
109 "ColorToRGB" sped up the program by several percent.
110
112 This module exports exactly one function, "memoize". The rest of the
113 functions in this package are None of Your Business.
114
115 You should say
116
117 memoize(function)
118
119 where "function" is the name of the function you want to memoize, or a
120 reference to it. "memoize" returns a reference to the new, memoized
121 version of the function, or "undef" on a non-fatal error. At present,
122 there are no non-fatal errors, but there might be some in the future.
123
124 If "function" was the name of a function, then "memoize" hides the old
125 version and installs the new memoized version under the old name, so
126 that "&function(...)" actually invokes the memoized version.
127
129 There are some optional options you can pass to "memoize" to change the
130 way it behaves a little. To supply options, invoke "memoize" like
131 this:
132
133 memoize(function, NORMALIZER => function,
134 INSTALL => newname,
135 SCALAR_CACHE => option,
136 LIST_CACHE => option
137 );
138
139 Each of these options is optional; you can include some, all, or none
140 of them.
141
142 INSTALL
143 If you supply a function name with "INSTALL", memoize will install the
144 new, memoized version of the function under the name you give. For
145 example,
146
147 memoize('fib', INSTALL => 'fastfib')
148
149 installs the memoized version of "fib" as "fastfib"; without the
150 "INSTALL" option it would have replaced the old "fib" with the memoized
151 version.
152
153 To prevent "memoize" from installing the memoized version anywhere, use
154 "INSTALL => undef".
155
156 NORMALIZER
157 Suppose your function looks like this:
158
159 # Typical call: f('aha!', A => 11, B => 12);
160 sub f {
161 my $a = shift;
162 my %hash = @_;
163 $hash{B} ||= 2; # B defaults to 2
164 $hash{C} ||= 7; # C defaults to 7
165
166 # Do something with $a, %hash
167 }
168
169 Now, the following calls to your function are all completely
170 equivalent:
171
172 f(OUCH);
173 f(OUCH, B => 2);
174 f(OUCH, C => 7);
175 f(OUCH, B => 2, C => 7);
176 f(OUCH, C => 7, B => 2);
177 (etc.)
178
179 However, unless you tell "Memoize" that these calls are equivalent, it
180 will not know that, and it will compute the values for these
181 invocations of your function separately, and store them separately.
182
183 To prevent this, supply a "NORMALIZER" function that turns the program
184 arguments into a string in a way that equivalent arguments turn into
185 the same string. A "NORMALIZER" function for "f" above might look like
186 this:
187
188 sub normalize_f {
189 my $a = shift;
190 my %hash = @_;
191 $hash{B} ||= 2;
192 $hash{C} ||= 7;
193
194 join(',', $a, map ($_ => $hash{$_}) sort keys %hash);
195 }
196
197 Each of the argument lists above comes out of the "normalize_f"
198 function looking exactly the same, like this:
199
200 OUCH,B,2,C,7
201
202 You would tell "Memoize" to use this normalizer this way:
203
204 memoize('f', NORMALIZER => 'normalize_f');
205
206 "memoize" knows that if the normalized version of the arguments is the
207 same for two argument lists, then it can safely look up the value that
208 it computed for one argument list and return it as the result of
209 calling the function with the other argument list, even if the argument
210 lists look different.
211
212 The default normalizer just concatenates the arguments with character
213 28 in between. (In ASCII, this is called FS or control-\.) This
214 always works correctly for functions with only one string argument, and
215 also when the arguments never contain character 28. However, it can
216 confuse certain argument lists:
217
218 normalizer("a\034", "b")
219 normalizer("a", "\034b")
220 normalizer("a\034\034b")
221
222 for example.
223
224 Since hash keys are strings, the default normalizer will not
225 distinguish between "undef" and the empty string. It also won't work
226 when the function's arguments are references. For example, consider a
227 function "g" which gets two arguments: A number, and a reference to an
228 array of numbers:
229
230 g(13, [1,2,3,4,5,6,7]);
231
232 The default normalizer will turn this into something like
233 "13\034ARRAY(0x436c1f)". That would be all right, except that a
234 subsequent array of numbers might be stored at a different location
235 even though it contains the same data. If this happens, "Memoize" will
236 think that the arguments are different, even though they are
237 equivalent. In this case, a normalizer like this is appropriate:
238
239 sub normalize { join ' ', $_[0], @{$_[1]} }
240
241 For the example above, this produces the key "13 1 2 3 4 5 6 7".
242
243 Another use for normalizers is when the function depends on data other
244 than those in its arguments. Suppose you have a function which returns
245 a value which depends on the current hour of the day:
246
247 sub on_duty {
248 my ($problem_type) = @_;
249 my $hour = (localtime)[2];
250 open my $fh, "$DIR/$problem_type" or die...;
251 my $line;
252 while ($hour-- > 0)
253 $line = <$fh>;
254 }
255 return $line;
256 }
257
258 At 10:23, this function generates the 10th line of a data file; at 3:45
259 PM it generates the 15th line instead. By default, "Memoize" will only
260 see the $problem_type argument. To fix this, include the current hour
261 in the normalizer:
262
263 sub normalize { join ' ', (localtime)[2], @_ }
264
265 The calling context of the function (scalar or list context) is
266 propagated to the normalizer. This means that if the memoized function
267 will treat its arguments differently in list context than it would in
268 scalar context, you can have the normalizer function select its
269 behavior based on the results of "wantarray". Even if called in a list
270 context, a normalizer should still return a single string.
271
272 "SCALAR_CACHE", "LIST_CACHE"
273 Normally, "Memoize" caches your function's return values into an
274 ordinary Perl hash variable. However, you might like to have the
275 values cached on the disk, so that they persist from one run of your
276 program to the next, or you might like to associate some other
277 interesting semantics with the cached values.
278
279 There's a slight complication under the hood of "Memoize": There are
280 actually two caches, one for scalar values and one for list values.
281 When your function is called in scalar context, its return value is
282 cached in one hash, and when your function is called in list context,
283 its value is cached in the other hash. You can control the caching
284 behavior of both contexts independently with these options.
285
286 The argument to "LIST_CACHE" or "SCALAR_CACHE" must either be one of
287 the following four strings:
288
289 MEMORY
290 FAULT
291 MERGE
292 HASH
293
294 or else it must be a reference to an array whose first element is one
295 of these four strings, such as "[HASH, arguments...]".
296
297 "MEMORY"
298 "MEMORY" means that return values from the function will be cached
299 in an ordinary Perl hash variable. The hash variable will not
300 persist after the program exits. This is the default.
301
302 "HASH"
303 "HASH" allows you to specify that a particular hash that you supply
304 will be used as the cache. You can tie this hash beforehand to
305 give it any behavior you want.
306
307 A tied hash can have any semantics at all. It is typically tied to
308 an on-disk database, so that cached values are stored in the
309 database and retrieved from it again when needed, and the disk file
310 typically persists after your program has exited. See "perltie"
311 for more complete details about "tie".
312
313 A typical example is:
314
315 use DB_File;
316 tie my %cache => 'DB_File', $filename, O_RDWR|O_CREAT, 0666;
317 memoize 'function', SCALAR_CACHE => [HASH => \%cache];
318
319 This has the effect of storing the cache in a "DB_File" database
320 whose name is in $filename. The cache will persist after the
321 program has exited. Next time the program runs, it will find the
322 cache already populated from the previous run of the program. Or
323 you can forcibly populate the cache by constructing a batch program
324 that runs in the background and populates the cache file. Then
325 when you come to run your real program the memoized function will
326 be fast because all its results have been precomputed.
327
328 Another reason to use "HASH" is to provide your own hash variable.
329 You can then inspect or modify the contents of the hash to gain
330 finer control over the cache management.
331
332 "TIE"
333 This option is no longer supported. It is still documented only to
334 aid in the debugging of old programs that use it. Old programs
335 should be converted to use the "HASH" option instead.
336
337 memoize ... ['TIE', PACKAGE, ARGS...]
338
339 is merely a shortcut for
340
341 require PACKAGE;
342 { tie my %cache, PACKAGE, ARGS...;
343 memoize ... [HASH => \%cache];
344 }
345
346 "FAULT"
347 "FAULT" means that you never expect to call the function in scalar
348 (or list) context, and that if "Memoize" detects such a call, it
349 should abort the program. The error message is one of
350
351 `foo' function called in forbidden list context at line ...
352 `foo' function called in forbidden scalar context at line ...
353
354 "MERGE"
355 "MERGE" normally means that the memoized function does not
356 distinguish between list and sclar context, and that return values
357 in both contexts should be stored together. Both "LIST_CACHE =>
358 MERGE" and "SCALAR_CACHE => MERGE" mean the same thing.
359
360 Consider this function:
361
362 sub complicated {
363 # ... time-consuming calculation of $result
364 return $result;
365 }
366
367 The "complicated" function will return the same numeric $result
368 regardless of whether it is called in list or in scalar context.
369
370 Normally, the following code will result in two calls to
371 "complicated", even if "complicated" is memoized:
372
373 $x = complicated(142);
374 ($y) = complicated(142);
375 $z = complicated(142);
376
377 The first call will cache the result, say 37, in the scalar cache;
378 the second will cach the list "(37)" in the list cache. The third
379 call doesn't call the real "complicated" function; it gets the
380 value 37 from the scalar cache.
381
382 Obviously, the second call to "complicated" is a waste of time, and
383 storing its return value is a waste of space. Specifying
384 "LIST_CACHE => MERGE" will make "memoize" use the same cache for
385 scalar and list context return values, so that the second call uses
386 the scalar cache that was populated by the first call.
387 "complicated" ends up being called only once, and both subsequent
388 calls return 3 from the cache, regardless of the calling context.
389
390 List values in scalar context
391
392 Consider this function:
393
394 sub iota { return reverse (1..$_[0]) }
395
396 This function normally returns a list. Suppose you memoize it and
397 merge the caches:
398
399 memoize 'iota', SCALAR_CACHE => 'MERGE';
400
401 @i7 = iota(7);
402 $i7 = iota(7);
403
404 Here the first call caches the list (1,2,3,4,5,6,7). The second call
405 does not really make sense. "Memoize" cannot guess what behavior "iota"
406 should have in scalar context without actually calling it in scalar
407 context. Normally "Memoize" would call "iota" in scalar context and
408 cache the result, but the "SCALAR_CACHE => 'MERGE'" option says not to
409 do that, but to use the cache list-context value instead. But it cannot
410 return a list of seven elements in a scalar context. In this case $i7
411 will receive the first element of the cached list value, namely 7.
412
413 Merged disk caches
414
415 Another use for "MERGE" is when you want both kinds of return values
416 stored in the same disk file; this saves you from having to deal with
417 two disk files instead of one. You can use a normalizer function to
418 keep the two sets of return values separate. For example:
419
420 tie my %cache => 'MLDBM', 'DB_File', $filename, ...;
421
422 memoize 'myfunc',
423 NORMALIZER => 'n',
424 SCALAR_CACHE => [HASH => \%cache],
425 LIST_CACHE => 'MERGE',
426 ;
427
428 sub n {
429 my $context = wantarray() ? 'L' : 'S';
430 # ... now compute the hash key from the arguments ...
431 $hashkey = "$context:$hashkey";
432 }
433
434 This normalizer function will store scalar context return values in the
435 disk file under keys that begin with "S:", and list context return
436 values under keys that begin with "L:".
437
439 "unmemoize"
440 There's an "unmemoize" function that you can import if you want to.
441 Why would you want to? Here's an example: Suppose you have your cache
442 tied to a DBM file, and you want to make sure that the cache is written
443 out to disk if someone interrupts the program. If the program exits
444 normally, this will happen anyway, but if someone types control-C or
445 something then the program will terminate immediately without
446 synchronizing the database. So what you can do instead is
447
448 $SIG{INT} = sub { unmemoize 'function' };
449
450 "unmemoize" accepts a reference to, or the name of a previously
451 memoized function, and undoes whatever it did to provide the memoized
452 version in the first place, including making the name refer to the
453 unmemoized version if appropriate. It returns a reference to the
454 unmemoized version of the function.
455
456 If you ask it to unmemoize a function that was never memoized, it
457 croaks.
458
459 "flush_cache"
460 "flush_cache(function)" will flush out the caches, discarding all the
461 cached data. The argument may be a function name or a reference to a
462 function. For finer control over when data is discarded or expired,
463 see the documentation for "Memoize::Expire", included in this package.
464
465 Note that if the cache is a tied hash, "flush_cache" will attempt to
466 invoke the "CLEAR" method on the hash. If there is no "CLEAR" method,
467 this will cause a run-time error.
468
469 An alternative approach to cache flushing is to use the "HASH" option
470 (see above) to request that "Memoize" use a particular hash variable as
471 its cache. Then you can examine or modify the hash at any time in any
472 way you desire. You may flush the cache by using "%hash = ()".
473
475 Memoization is not a cure-all:
476
477 · Do not memoize a function whose behavior depends on program state
478 other than its own arguments, such as global variables, the time of
479 day, or file input. These functions will not produce correct
480 results when memoized. For a particularly easy example:
481
482 sub f {
483 time;
484 }
485
486 This function takes no arguments, and as far as "Memoize" is
487 concerned, it always returns the same result. "Memoize" is wrong,
488 of course, and the memoized version of this function will call
489 "time" once to get the current time, and it will return that same
490 time every time you call it after that.
491
492 · Do not memoize a function with side effects.
493
494 sub f {
495 my ($a, $b) = @_;
496 my $s = $a + $b;
497 print "$a + $b = $s.\n";
498 }
499
500 This function accepts two arguments, adds them, and prints their
501 sum. Its return value is the numuber of characters it printed, but
502 you probably didn't care about that. But "Memoize" doesn't
503 understand that. If you memoize this function, you will get the
504 result you expect the first time you ask it to print the sum of 2
505 and 3, but subsequent calls will return 1 (the return value of
506 "print") without actually printing anything.
507
508 · Do not memoize a function that returns a data structure that is
509 modified by its caller.
510
511 Consider these functions: "getusers" returns a list of users
512 somehow, and then "main" throws away the first user on the list and
513 prints the rest:
514
515 sub main {
516 my $userlist = getusers();
517 shift @$userlist;
518 foreach $u (@$userlist) {
519 print "User $u\n";
520 }
521 }
522
523 sub getusers {
524 my @users;
525 # Do something to get a list of users;
526 \@users; # Return reference to list.
527 }
528
529 If you memoize "getusers" here, it will work right exactly once.
530 The reference to the users list will be stored in the memo table.
531 "main" will discard the first element from the referenced list.
532 The next time you invoke "main", "Memoize" will not call
533 "getusers"; it will just return the same reference to the same list
534 it got last time. But this time the list has already had its head
535 removed; "main" will erroneously remove another element from it.
536 The list will get shorter and shorter every time you call "main".
537
538 Similarly, this:
539
540 $u1 = getusers();
541 $u2 = getusers();
542 pop @$u1;
543
544 will modify $u2 as well as $u1, because both variables are
545 references to the same array. Had "getusers" not been memoized,
546 $u1 and $u2 would have referred to different arrays.
547
548 · Do not memoize a very simple function.
549
550 Recently someone mentioned to me that the Memoize module made his
551 program run slower instead of faster. It turned out that he was
552 memoizing the following function:
553
554 sub square {
555 $_[0] * $_[0];
556 }
557
558 I pointed out that "Memoize" uses a hash, and that looking up a
559 number in the hash is necessarily going to take a lot longer than a
560 single multiplication. There really is no way to speed up the
561 "square" function.
562
563 Memoization is not magical.
564
566 You can tie the cache tables to any sort of tied hash that you want to,
567 as long as it supports "TIEHASH", "FETCH", "STORE", and "EXISTS". For
568 example,
569
570 tie my %cache => 'GDBM_File', $filename, O_RDWR|O_CREAT, 0666;
571 memoize 'function', SCALAR_CACHE => [HASH => \%cache];
572
573 works just fine. For some storage methods, you need a little glue.
574
575 "SDBM_File" doesn't supply an "EXISTS" method, so included in this
576 package is a glue module called "Memoize::SDBM_File" which does provide
577 one. Use this instead of plain "SDBM_File" to store your cache table
578 on disk in an "SDBM_File" database:
579
580 tie my %cache => 'Memoize::SDBM_File', $filename, O_RDWR|O_CREAT, 0666;
581 memoize 'function', SCALAR_CACHE => [HASH => \%cache];
582
583 "NDBM_File" has the same problem and the same solution. (Use
584 "Memoize::NDBM_File instead of plain NDBM_File.")
585
586 "Storable" isn't a tied hash class at all. You can use it to store a
587 hash to disk and retrieve it again, but you can't modify the hash while
588 it's on the disk. So if you want to store your cache table in a
589 "Storable" database, use "Memoize::Storable", which puts a hashlike
590 front-end onto "Storable". The hash table is actually kept in memory,
591 and is loaded from your "Storable" file at the time you memoize the
592 function, and stored back at the time you unmemoize the function (or
593 when your program exits):
594
595 tie my %cache => 'Memoize::Storable', $filename;
596 memoize 'function', SCALAR_CACHE => [HASH => \%cache];
597
598 tie my %cache => 'Memoize::Storable', $filename, 'nstore';
599 memoize 'function', SCALAR_CACHE => [HASH => \%cache];
600
601 Include the `nstore' option to have the "Storable" database written in
602 `network order'. (See Storable for more details about this.)
603
604 The "flush_cache()" function will raise a run-time error unless the
605 tied package provides a "CLEAR" method.
606
608 See Memoize::Expire, which is a plug-in module that adds expiration
609 functionality to Memoize. If you don't like the kinds of policies that
610 Memoize::Expire implements, it is easy to write your own plug-in module
611 to implement whatever policy you desire. Memoize comes with several
612 examples. An expiration manager that implements a LRU policy is
613 available on CPAN as Memoize::ExpireLRU.
614
616 The test suite is much better, but always needs improvement.
617
618 There is some problem with the way "goto &f" works under threaded Perl,
619 perhaps because of the lexical scoping of @_. This is a bug in Perl,
620 and until it is resolved, memoized functions will see a slightly
621 different "caller()" and will perform a little more slowly on threaded
622 perls than unthreaded perls.
623
624 Some versions of "DB_File" won't let you store data under a key of
625 length 0. That means that if you have a function "f" which you
626 memoized and the cache is in a "DB_File" database, then the value of
627 "f()" ("f" called with no arguments) will not be memoized. If this is
628 a big problem, you can supply a normalizer function that prepends "x"
629 to every key.
630
632 To join a very low-traffic mailing list for announcements about
633 "Memoize", send an empty note to "mjd-perl-memoize-request@plover.com".
634
636 Mark-Jason Dominus ("mjd-perl-memoize+@plover.com"), Plover Systems co.
637
638 See the "Memoize.pm" Page at http://perl.plover.com/Memoize/ for news
639 and upgrades. Near this page, at http://perl.plover.com/MiniMemoize/
640 there is an article about memoization and about the internals of
641 Memoize that appeared in The Perl Journal, issue #13. (This article is
642 also included in the Memoize distribution as `article.html'.)
643
644 The author's book Higher-Order Perl (2005, ISBN 1558607013, published
645 by Morgan Kaufmann) discusses memoization (and many other topics) in
646 tremendous detail. It is available on-line for free. For more
647 information, visit http://hop.perl.plover.com/ .
648
649 To join a mailing list for announcements about "Memoize", send an empty
650 message to "mjd-perl-memoize-request@plover.com". This mailing list is
651 for announcements only and has extremely low traffic---fewer than two
652 messages per year.
653
655 Copyright 1998, 1999, 2000, 2001, 2012 by Mark Jason Dominus
656
657 This library is free software; you may redistribute it and/or modify it
658 under the same terms as Perl itself.
659
661 Many thanks to Florian Ragwitz for administration and packaging
662 assistance, to John Tromp for bug reports, to Jonathan Roy for bug
663 reports and suggestions, to Michael Schwern for other bug reports and
664 patches, to Mike Cariaso for helping me to figure out the Right Thing
665 to Do About Expiration, to Joshua Gerth, Joshua Chamas, Jonathan Roy
666 (again), Mark D. Anderson, and Andrew Johnson for more suggestions
667 about expiration, to Brent Powers for the Memoize::ExpireLRU module, to
668 Ariel Scolnicov for delightful messages about the Fibonacci function,
669 to Dion Almaer for thought-provoking suggestions about the default
670 normalizer, to Walt Mankowski and Kurt Starsinic for much help
671 investigating problems under threaded Perl, to Alex Dudkevich for
672 reporting the bug in prototyped functions and for checking my patch, to
673 Tony Bass for many helpful suggestions, to Jonathan Roy (again) for
674 finding a use for "unmemoize()", to Philippe Verdret for enlightening
675 discussion of "Hook::PrePostCall", to Nat Torkington for advice I
676 ignored, to Chris Nandor for portability advice, to Randal Schwartz for
677 suggesting the '"flush_cache" function, and to Jenda Krynicky for being
678 a light in the world.
679
680 Special thanks to Jarkko Hietaniemi, the 5.8.0 pumpking, for including
681 this module in the core and for his patient and helpful guidance during
682 the integration process.
683
685 Hey! The above document had some coding errors, which are explained
686 below:
687
688 Around line 755:
689 You forgot a '=back' before '=head3'
690
691 Around line 804:
692 =back without =over
693
694
695
696perl v5.32.1 2021-03-31 Memoize(3pm)