Skip to content

Commit d7d7886

Browse files
committed
Adapt the README to the new strategy style
1 parent eb515ce commit d7d7886

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,26 @@ The Benign library is an attempt to address this gap. A difficulty is
2424
laziness. With laziness, things have a beginning (when the thunk is
2525
being forced), but not a well-defined end. So what do we measure the
2626
time of? The solution of the Benign library is to be less lazy. We
27-
keep laziness for algorithms, but use strict (or at least stricter)
28-
types to assemble bigger steps. It's fine to log or trace in pure
29-
code, since we don't consider that these observations are part of the
30-
semantics of the program.
27+
keep laziness for algorithms, but use evaluate more strictly when
28+
assembling bigger steps. It's fine to log or trace in pure code, since
29+
we don't consider that these observations are part of the semantics of
30+
the program.
3131

3232
The Benign library provides facilities to create benign effects,
33-
including to use strict types to assemble these large steps.
33+
including evaluation strategies to express precisely how strict we
34+
want to be.
3435

3536
The premise underlying all this, as well as the implementation of the
3637
library, is that logging or tracing is not very fast. So we don't want
3738
to log or trace in places where performance is really essential. This
3839
is why at the most inner level, where tight loops and algorithms live,
3940
laziness is not a problem: we are not going to log there, this would
40-
cost too much performance. At a more outer level, we can use
41-
strictness to make steps with a beginning and an end. It's ok if there
42-
is a cost in terms of conversion, this is not where we need to
43-
optimise too much. The library can, and does, prevent optimisation
44-
through its functions (note that cost-centre profiling also prevents
45-
optimisation through cost centres; it isn't surprising that we are
46-
having a similar problem). With the optimisation not working at that
47-
level, strictness is much less of a problem.
41+
cost too much performance. The library can, and does, prevent
42+
optimisation through its functions anyway (note that cost-centre
43+
profiling also prevents optimisation through cost centres; it isn't
44+
surprising that we are having a similar problem). So benign effects
45+
all must happen at rather macro steps, where we don't have to worry
46+
too much about the impact of evaluation.
4847

4948
## Backends
5049

0 commit comments

Comments
 (0)