Skip to content

Commit 111695e

Browse files
committed
Last tweaks?
Sorry about tweak stream raiph--
1 parent be235bf commit 111695e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

doc/Language/performance.pod

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
=SUBTITLE Measuring and improving run-time or compile-time performance
66
7-
This page is about anything to do with L<computer performance|https://en.wikipedia.org/wiki/Computer_Performance>
7+
This page is about anything to do with L<computer performance|https://en.wikipedia.org/wiki/Computer_performance>
88
in the context of Perl 6.
99
1010
=head1 First, clarify the problem
@@ -17,8 +17,8 @@ L<"critical 3%"|https://en.wikiquote.org/wiki/Donald_Knuth> by "profiling" as ex
1717
Expressions of the form C<now - BEGIN now>, where C<BEGIN> is a
1818
L<phase in the running of a Perl 6 program|/language/phasers>, provide a great idiom for timing code snippets.
1919
20-
Using the C<m: your code goes here> L<#perl6 channel evalbot|http://doc.perl6.org/language/glossary#camelia>
21-
you can write lines like:
20+
Use the C<m: your code goes here> L<#perl6 channel evalbot|http://doc.perl6.org/language/glossary#camelia>
21+
to write lines like:
2222
2323
m: say now - INIT now
2424
rakudo-moar 8bd7ee: OUTPUT«0.0018558␤»
@@ -28,8 +28,8 @@ because the latter occurs during L<the INIT phase|/language/phasers#INIT>.
2828
2929
=head2 Profile with C<prof-m: your code goes here>
3030
31-
Entering C<prof-m: your code goes here> in the L<#perl6 channel|http://doc.perl6.org/language/glossary#IRC>
32-
invokes an evalbot that runs a Perl 6 compiler with a C<--profile> option.
31+
Enter C<prof-m: your code goes here> in the L<#perl6 channel|http://doc.perl6.org/language/glossary#IRC>
32+
to invoke a Perl 6 compiler with a C<--profile> option.
3333
The evalbot's output includes a link to L<profile info|https://en.wikipedia.org/wiki/Profiling_(computer_programming)>:
3434
3535
=begin code :allow< L >
@@ -84,7 +84,7 @@ Start by identifying the L<"critical 3%"|https://en.wikiquote.org/wiki/Donald_Kn
8484
8585
=head2 Line by line
8686
87-
A quick, fun and frequently very productive way to try improve code line-by-line is to collaborate with
87+
A quick, fun, productive way to try improve code line-by-line is to collaborate with
8888
others using the L<#perl6|http://doc.perl6.org/language/glossary#IRC> evalbot
8989
L<camelia|http://doc.perl6.org/language/glossary#camelia>.
9090
@@ -144,16 +144,16 @@ that array:
144144
The assignment of all the lines in 'largefile.txt' to C<@lines> all at once is called "eager" assignment,
145145
the opposite of "lazy".
146146
147-
But if 'largefile.txt' contains a million very long lines you just used up a ton of memory and it may
147+
If 'largefile.txt' contains a million very long lines you just used up a ton of memory and it may
148148
well take quite a while before your code starts to do something with the first line.
149149
150-
A "lazy" approach often performs much better:
150+
A "lazy" approach often performs much better than an eager one:
151151
152152
for 'largefile.txt'.IO.lines -> $line {
153153
# do something with $line
154154
}
155155
156-
This loop pulls just one line from 'largefile.txt', immediately processes it, then gets the next, and so on.
156+
This loop pulls a line from 'largefile.txt', immediately processes it, then gets the next, and so on.
157157
158158
=head3 Change sequential/blocking code to parallel/non-blocking
159159
@@ -189,7 +189,7 @@ Perl 5's compiler can be treated as a C lib. Mix in Perl 6 types, the L<MOP|/lan
189189
programming that someone else has done for you, and the upshot is that you can conveniently
190190
L<use Perl 5 modules in Perl 6|http://stackoverflow.com/a/27206428/1077672>.
191191
192-
More generally, Perl 6 is designed to be able to smoothly interop with other languages and there are a number
192+
More generally, Perl 6 is designed for smooth interop with other languages and there are a number
193193
of L<modules aimed at providing convenient use of libs from other langs|http://modules.perl6.org/#q=inline>.
194194
195195
=head2 Make the Rakudo compiler generate faster code

0 commit comments

Comments
 (0)