Skip to content

Commit

Permalink
Updated pod for n with an example.
Browse files Browse the repository at this point in the history
  • Loading branch information
Timofey Potapov committed Sep 2, 2024
1 parent 1ea279b commit 01883b4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ Benchmark and compare different pieces of code.
fast => sub{ ... },
}, 10000;

$ perl -Me -e '$v = 333; n { concat => sub { 111 . $v }, interp => sub { "111$v" }, list => sub { 111,$v } }, 100000000'

Rate interp concat list
interp 55248619/s -- -6% -62%
concat 58479532/s 6% -- -60%
list 144927536/s 162% 148% --

## Format Conversions

### j
Expand Down
7 changes: 7 additions & 0 deletions lib/e.pm
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ Benchmark and compare different pieces of code.
fast => sub{ ... },
}, 10000;
$ perl -Me -e '$v = 333; n { concat => sub { 111 . $v }, interp => sub { "111$v" }, list => sub { 111,$v } }, 100000000'
Rate interp concat list
interp 55248619/s -- -6% -62%
concat 58479532/s 6% -- -60%
list 144927536/s 162% 148% --
=cut

=head2 Format Conversions
Expand Down

0 comments on commit 01883b4

Please sign in to comment.