Changes between Version 3 and Version 9 of Ticket #149


Ignore:
Timestamp:
Feb 18, 2008 10:50:14 AM (7 years ago)
Author:
simonmar
Comment:

The problem seems to be that Float Out isn't floating out the let expression in the guard, whereas presumably it used to. The let can't be floated out past a lambda, but nevertheless floating it would reveal an opportunity for CSE.

Plan: try floating out all lets, even if they can't move past a lambda, and measure the difference on nofib.

Not urgent enough for 6.8.3.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #149

    • Property Status changed from assigned to new
    • Property Difficulty changed from Unknown to Moderate (1 day)
    • Property Milestone changed from _|_ to 6.8 branch
    • Property Priority changed from low to normal
    • Property Severity changed from normal to minor
    • Property Type changed from bug to run-time performance bug
    • Property Owner nobody deleted
    • Property Test Case changed from to simplrun006
  • Ticket #149 – Description

    v3 v9  
    1 {{{ 
    21Don't know if this is a bug, but it was at least 
    32_surprising_ to find that 
    43 
     4{{{ 
    55playerMostOccur [a] = a 
    6 playerMostOccur (x:xs)| numOccur x (x:xs) 
    7                                   >  
    8                                   numOccur 
    9 (playerMostOccur xs) xs 
    10                                   = x 
    11                                 | otherwise = 
    12 playerMostOccur xs 
     6playerMostOccur (x:xs) 
     7 | numOccur x (x:xs) > numOccur (playerMostOccur xs) xs = x 
     8 | otherwise = playerMostOccur xs 
     9}}} 
    1310 
    1411was exponentially slower when compiled with ghc-5.04.2 
    1512-O than: 
    1613 
     14{{{ 
    1715playerMostOccur [a] = a 
    18 playerMostOccur (x:xs)| numOccur x (x:xs) 
    19                                   >  
    20                                   numOccur pmo xs 
    21                                   = x 
    22                                 | otherwise = pmo 
    23                                   where pmo = 
    24 playerMostOccur xs 
     16playerMostOccur (x:xs) 
     17 | numOccur x (x:xs) > numOccur pmo xs = x 
     18 | otherwise = pmo 
     19 where pmo = playerMostOccur xs 
     20}}} 
    2521 
    2622Although the student responsible for the code couldn't 
     
    3127 
    3228-Greg(gregm.at.cs.uwa.edu.au) 
    33 }}}