Skip to content
Snippets Groups Projects
Commit adc47ae7 authored by Simon Peyton Jones's avatar Simon Peyton Jones Committed by pcapriotti
Browse files

Fix worker/wrapper for CPR functions

A long-standing and egregious bug in the worker/wrapper code meant
that some functions with the CPR property weren't getting a CPR
w/w. And that had the effect of making a tail-recursive function not
tail recursive.  As well as increasing allocation.

Fixes Trac #5920, and #5997.

Nofib results (highlights):

        Program           Size    Allocs   Runtime   Elapsed  TotalMem
--------------------------------------------------------------------------------
         boyer2          -0.1%    -15.3%      0.01      0.01     +0.0%
        mandel2          -0.0%     -8.1%      0.01      0.01     +0.0%
           para          -0.1%    -11.8%     -7.9%     -7.8%     +0.0%
--------------------------------------------------------------------------------
            Min          -0.1%    -15.3%     -7.9%     -7.8%    -33.3%
            Max          +0.0%     +0.2%     +6.3%     +6.3%     +3.7%
 Geometric Mean          -0.0%     -0.4%     +0.1%     +0.1%     -0.5%

Looks like a clear win.  And I have not even recompiled the libraries, so
it'll probably be a bit better in the ed.

MERGED from commit b8ff4448
parent f49c76e9
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment