Skip to content

Draft: Perf: bundle FastMutInts (#16822)

Sylvain Henry requested to merge hsyl20/ghc:hsyl20/perf-fastint2 into master
  • allow two FastMutInts to be bundled in the same ByteArray to reduce allocations
  • use this in GHC.Utils.Binary

Found with ticky on the simple example in #16822

Metrics: compile_time/bytes allocated
-------------------------------------

                                               Baseline                      
                           Test    Metric         value     New value Change 
-----------------------------------------------------------------------------
       ManyAlternatives(normal) ghc/alloc   745,607,132   745,261,856  -0.0% 
       ManyConstructors(normal) ghc/alloc 3,991,507,836 3,989,383,184  -0.1% 
      MultiLayerModules(normal) ghc/alloc 3,062,035,508 3,061,051,464  -0.0% 
MultiLayerModulesRecomp(normal) ghc/alloc   894,094,816   893,463,672  -0.1% 
              PmSeriesG(normal) ghc/alloc    45,857,356    45,683,568  -0.4% 
              PmSeriesS(normal) ghc/alloc    54,105,392    53,933,224  -0.3% 
              PmSeriesT(normal) ghc/alloc    77,477,072    77,304,296  -0.2% 
              PmSeriesV(normal) ghc/alloc    53,485,448    53,312,784  -0.3% 
                 T10421(normal) ghc/alloc   112,612,744   112,361,688  -0.2% 
                T10421a(normal) ghc/alloc    78,676,820    78,445,408  -0.3% 
                 T10547(normal) ghc/alloc    28,327,552    28,268,360  -0.2% 
                 T10858(normal) ghc/alloc   126,078,300   125,702,296  -0.3% 
                 T11195(normal) ghc/alloc   235,547,116   234,993,168  -0.2% 
                 T11276(normal) ghc/alloc    96,081,872    95,826,872  -0.3% 
                T11303b(normal) ghc/alloc    40,647,416    40,456,400  -0.5% 
                 T11374(normal) ghc/alloc   194,869,004   194,627,800  -0.1% 
                 T11545(normal) ghc/alloc   971,619,688   971,339,448  -0.0% 
                 T11822(normal) ghc/alloc   109,370,860   109,046,408  -0.3% 
                 T12150(optasm) ghc/alloc    78,873,824    78,661,072  -0.3% 
                 T12227(normal) ghc/alloc   493,878,864   493,233,376  -0.1% 
                 T12234(optasm) ghc/alloc    56,697,936    56,460,744  -0.4% 
                 T12425(optasm) ghc/alloc    90,344,204    90,070,512  -0.3% 
                 T12545(normal) ghc/alloc 1,694,274,064 1,694,075,440  -0.0% 
                 T12707(normal) ghc/alloc   955,338,556   954,757,120  -0.1% 
                 T13035(normal) ghc/alloc   101,700,832   101,492,120  -0.2% 
                 T13056(optasm) ghc/alloc   365,668,104   364,940,472  -0.2% 
                 T13253(normal) ghc/alloc   332,521,812   331,981,216  -0.2% 
             T13253-spj(normal) ghc/alloc   124,537,000   124,322,792  -0.2% 
                 T13379(normal) ghc/alloc   358,809,716   358,631,272  -0.0% 
                 T13701(normal) ghc/alloc 2,399,736,804 2,399,245,480  -0.0% 
                 T13719(normal) ghc/alloc 4,191,140,712 4,188,964,456  -0.1% 
                   T14052(ghci) ghc/alloc 3,808,067,304 3,809,820,960  +0.0% 
               T14052Type(ghci) ghc/alloc 3,809,179,028 3,809,406,360  +0.0% 
                 T14683(normal) ghc/alloc 2,990,899,824 2,985,657,240  -0.2% 
                 T14697(normal) ghc/alloc   363,203,380   363,015,216  -0.1% 
                 T15164(normal) ghc/alloc 1,289,538,432 1,289,052,800  -0.0% 
                 T15304(normal) ghc/alloc 1,276,444,144 1,276,071,832  -0.0% 
                 T15630(normal) ghc/alloc   160,491,948   160,268,472  -0.1% 
                 T16190(normal) ghc/alloc   276,789,220   275,702,832  -0.4% 
                 T16577(normal) ghc/alloc 7,535,562,636 7,533,310,416  -0.0% 
                 T16875(normal) ghc/alloc    34,868,396    34,677,600  -0.5% 
                 T17096(normal) ghc/alloc   221,948,880   221,674,848  -0.1% 
                 T17516(normal) ghc/alloc 1,705,802,864 1,705,184,960  -0.0% 
                 T17836(normal) ghc/alloc   911,982,012   911,774,096  -0.0% 
                T17836b(normal) ghc/alloc    46,705,180    46,529,048  -0.4% 
                 T17977(normal) ghc/alloc    40,217,620    40,045,448  -0.4% 
                T17977b(normal) ghc/alloc    37,831,032    37,653,376  -0.5% 
                 T18140(normal) ghc/alloc    81,794,904    81,612,288  -0.2% 
                 T18223(normal) ghc/alloc 1,164,492,976 1,164,078,792  -0.0% 
                 T18282(normal) ghc/alloc   130,871,928   130,563,624  -0.2% 
                 T18304(normal) ghc/alloc    86,378,180    86,108,448  -0.3% 
                 T18478(normal) ghc/alloc   529,345,936   528,808,528  -0.1% 
                T18698a(normal) ghc/alloc   201,196,844   200,829,176  -0.2% 
                T18698b(normal) ghc/alloc   229,028,228   228,660,432  -0.2% 
                 T18923(normal) ghc/alloc    68,393,144    68,196,552  -0.3% 
                  T1969(normal) ghc/alloc   758,402,800   758,035,144  -0.0% 
                 T19695(normal) ghc/alloc 1,412,461,700 1,410,965,056  -0.1% 
                 T20049(normal) ghc/alloc    88,434,480    88,221,416  -0.2% 
                 T20261(normal) ghc/alloc   620,979,420   620,127,072  -0.1% 
                  T3064(normal) ghc/alloc   190,741,960   190,512,616  -0.1% 
                  T3294(normal) ghc/alloc 1,604,675,028 1,604,458,464  -0.0% 
                  T4801(normal) ghc/alloc   296,567,408   296,361,672  -0.1% 
                  T5030(normal) ghc/alloc   364,263,400   364,024,504  -0.1% 
                T5321FD(normal) ghc/alloc   270,398,384   270,147,408  -0.1% 
               T5321Fun(normal) ghc/alloc   300,552,744   300,301,456  -0.1% 
                  T5631(normal) ghc/alloc   575,589,380   575,135,016  -0.1% 
                  T5642(normal) ghc/alloc   469,051,240   468,494,920  -0.1% 
                  T5837(normal) ghc/alloc    35,941,452    35,745,880  -0.5% 
                  T6048(optasm) ghc/alloc   102,329,240   102,127,376  -0.2% 
                   T783(normal) ghc/alloc   386,224,196   386,036,272  -0.0% 
                  T9020(optasm) ghc/alloc   247,428,408   247,101,144  -0.1% 
                  T9198(normal) ghc/alloc    47,166,868    46,984,368  -0.4% 
                  T9233(normal) ghc/alloc   676,698,948   676,406,736  -0.0% 
                  T9630(normal) ghc/alloc 1,451,467,676 1,449,354,616  -0.1% 
                  T9675(optasm) ghc/alloc   426,966,472   426,722,808  -0.1% 
                 T9872a(normal) ghc/alloc 1,704,633,096 1,704,545,624  -0.0% 
                 T9872b(normal) ghc/alloc 2,180,091,080 2,180,002,928  -0.0% 
                 T9872c(normal) ghc/alloc 1,760,189,784 1,760,102,080  -0.0% 
                 T9872d(normal) ghc/alloc   500,935,632   500,697,936  -0.0% 
                  T9961(normal) ghc/alloc   353,016,268   352,413,360  -0.2% 
   TcPlugin_RewritePerf(normal) ghc/alloc 2,370,918,904 2,369,444,584  -0.1% 
                  WWRec(normal) ghc/alloc   587,826,708   587,441,368  -0.1% 
         hard_hole_fits(normal) ghc/alloc   492,501,216   490,902,992  -0.3% 
                 hie002(normal) ghc/alloc 9,333,518,192 9,326,561,288  -0.1% 
             parsing001(normal) ghc/alloc   537,422,368   537,443,800  +0.0% 
                                                                             
                      geo. mean                                        -0.2% 

* All baselines were measured in the same environment as this test run
* All baseline commits are 9552781abf
Edited by Andreas Klebinger

Merge request reports