Changes between Version 39 and Version 40 of NestedCPR


Ignore:
Timestamp:
Jan 15, 2014 12:27:58 PM (20 months ago)
Author:
nomeata
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NestedCPR

    v39 v40  
    113113 * What became of Simon’s better-ho-cardinality branch? See [./better-ho-cardinality].
    114114 * Try vtunes to get better numbers.
     115
     116==== Use Converges in exprOkForSpeculation ====
     117
     118The flag `Converges` has just about the same meaning as `exprOkForSpeculation`, so we can improve the latter by using the former.
     119
     120Effect on nofib is minuscule: `-0.1%` allocations for `fluid`, no other change in allocations.
     121
     122In `fluid` there are thunks calling `read_n_val`, which has a definition of `(.. ,...)`. CPR turns that in to (# ..., ... #). So currently, we are allocating a thunk for the worker of `read_n_val`, which when called will allocate a `(..,..)`, which later is taken apart by yet another two thunks `fst ..` and `snd ..`. After using the `Converges` flag, we immediately call `$wread_n_val`, which returns quickly after allocating two thunks. This also saves the thunks for `fst ..` and `snd ..`.
     123
     124But: This already happens not in CorePrep, but in `Float out`. It seems that the call form `lvlCase` makes the difference, as the levels differ and later evaluation is moved out of a `(#..,..#)` construct.
     125
     126TODO:
     127 * Get static numbers: How many things are ok for speculation before, how many afterwards