Skip to content

Commit 3b1ca38

Browse files
author
doyougnu
committed
how to use: reword for new architecture
1 parent 7ae4ec0 commit 3b1ca38

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
.. _Cachegrind:
1+
.. _Cachegrind Chapter:
22

33
:lightgrey:`Using Cachegrind`
44
=============================
5+
6+
`TODO <https://github.com/haskellfoundation/hs-opt-handbook.github.io/issues/10>`_

src/Measurement_Observation/Measurement_Third/linux_perf.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. Perf
1+
.. _Perf Chapter:
22

33
:lightgrey:`The perf utility`
44
=============================

src/Preliminaries/how_to_use.rst

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Purpose
77
-------
88

99
This book is written as a handbook for the intrepid Haskell developer. It
10-
attempts to make clear aspects of the GHC-based Haskell so that performance
10+
attempts to make clear aspects of GHC-based Haskell so that performance
1111
optimizations and recommendations are actionable, rather than mysterious
1212
invocations whispered around the internet.
1313

@@ -17,7 +17,7 @@ Intended Audience
1717
The Haskell Optimization Handbook is intended for developers using Haskell in
1818
their day to day life for money or pleasure. It assumes the audience is
1919
proficient with pure functional programming concepts, such as recursion, purity,
20-
higher-ordered functions functors, applicative functors, monads et cetera., and
20+
higher-ordered functions, functors, applicative functors, monads et cetera., and
2121
the basics of the Haskell ecosystem, such as using cabal or stack to compile and
2222
run a project.
2323

@@ -65,18 +65,20 @@ handbook. Thus, the book is not meant to be read in a linear order. Instead, one
6565
should pick and choose which chapter to read next based on their needs because
6666
*the book assumes you have a problem that needs solving*.
6767

68-
There are two general sections; both are ordered from the least time consuming
69-
to most time consuming topics. The first section, Part 1, aids the developer in
70-
identifying performance issues in their own code. Part 1 is primarily concerned
71-
with measurement, observation, repeatability and testing, but also includes
72-
methods of *direct observation* such as inspecting and understanding the
73-
``Core`` and ``Stg`` languages.
68+
There are two parts: Part 1, focuses on measurement, profiling and observation
69+
of Haskell programs. This part is ordered from the bottom-up; it begins with
70+
tools and probes that are language agnostic and close to the machine, such as
71+
:ref:`Perf <Perf Chapter>` and :ref:`Cachegrind <Cachegrind Chapter>`, then
72+
proceeds through each `intermediate representation
73+
<https://en.wikipedia.org/wiki/Intermediate_representation#:~:text=An%20intermediate%20representation%20(IR)%20is,such%20as%20optimization%20and%20translation.>`_
74+
(IR) describing the tools, probes, and information available at each IR.
7475

75-
The second section, Part 2, aids the developer in optimizing their code. It is
76+
Part 2, provides an ordered sequence of techniques to optimize code. It is
7677
ordered from the easiest methods, such as choosing the right libraries; to the
77-
hardest methods, such as exploiting ``backpack`` for fine-grained
78-
:term:`Unboxed` data types or exploiting :term:`Levity Polymorphism` to control
79-
the runtime representation of a data type.
78+
hardest and more invasive methods, such as exploiting :ref:`Backpack <Backpack
79+
Chapter>` for fine-grained :term:`Unboxed` data types or exploiting
80+
:term:`Levity Polymorphism` to control the runtime representation of a data
81+
type.
8082

8183

8284
Goals
@@ -111,6 +113,10 @@ HOH does not have:
111113
a given platform.
112114
#. Descriptions, analyses and explanations of functional algorithms or data
113115
structures. Content will instead be "Try unordered-containers if you have
114-
foo, bar, baz", rather than "This is what a bankers queue or HAMT is ...".
116+
this or that set of constraints", rather than "This is what a banker's queue
117+
[#]_ or `HAMT <https://en.wikipedia.org/wiki/Hash_array_mapped_trie>`_ is
118+
...".
115119
#. A monad or monad transformer tutorial. This is assumed knowledge in the
116120
audience.
121+
122+
.. [#] See :cite:t:`okasaki`, page 23.

0 commit comments

Comments
 (0)