Skip to content

Commit

Permalink
Run showValue on sparse list values
Browse files Browse the repository at this point in the history
This takes us from 70% of the time and lots of memory in spent showValue
on simple input to much more negligible time and space.
  • Loading branch information
Fuuzetsu committed Dec 22, 2016
1 parent 08aafc7 commit 67f68c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GHC/RTS/Events/Analyze/Reports/Timed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ writeReport' report h =

reportLine :: ReportLine -> [String]
reportLine ReportLineData{..} =
lineHeader : map showValue (unsparse 0 lineValues)
lineHeader : unsparse "0.00" (Map.map showValue lineValues)

showValue :: Double -> String
showValue = printf "%0.2f"

0 comments on commit 67f68c0

Please sign in to comment.