
#6084: Add stg_ap_pnnv and related call patterns -------------------------------------+------------------------------------ Reporter: SimonMeier | Owner: simonmar Type: feature request | Status: new Priority: high | Milestone: 7.8.1 Component: Runtime System | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: 8313 | Related Tickets: -------------------------------------+------------------------------------ Comment (by parcs): Here's a patch that fixes up Simon's original patch. It fixes three issues with the original patch: 1. The offset passed to `cmmLoadIndex` should be in units of the object's representation size, not necessarily bytes. So we divide `offset` by `rep_bytes`. 2. The `tablesNextToCode` logic was reversed. 3. We weren't untagging and dereferencing the function closure before passing it to `funInfoArity` and `entryCode`. With these three changes, the code in #8313 has a significant speed improvement. Before (that is, with vanilla GHC), the `auto` case would take 2.15s and the `manual` case 4.0s. Now, the `manual` case takes 0.75s. nofib doesn't seem to show a significant improvement in program runtime, but nofib compile times are down an average of 1.5% with a maximum improvement of 8%. I may be misinterpreting the results, however. int-e, how did you trigger the "PAP object entered!" error? I haven't come across it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/6084#comment:28 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler