Improve performance of newSmallArray#

Authored by michalt on Mar 24 2019, 7:58 AM.

Description

Improve performance of newSmallArray#

This:

  • Hoists part of the condition outside of the initialization loop in stg_newSmallArrayzh.
  • Annotates one of the unlikely branches as unlikely, also in stg_newSmallArrayzh.
  • Adds a couple of annotations to allocateMightFail indicating which branches are likely to be taken.

Together this gives about 5% improvement.

Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>

Details

Committed
Marge Bot <ben+marge-bot@smart-cactus.org>Apr 1 2019, 7:07 PM
Parents
rGHC39282422afe5: Bump array submodule
Branches
Unknown
Tags
Unknown
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC7cf5ba3dba88: Improve performance of newSmallArray# (authored by michalt).Apr 1 2019, 7:07 PM