FastString: SAT bucket_match
Working on smaller and faster FastStrings
because the JS backend makes heavy use of them and I noticed that bucket_match
could be SAT'd. I didn't check any core or stg, but this little patch improves MultiLayerModulesTH_OneShot
test on some platforms:
Metrics: compile_time/bytes allocated
-------------------------------------
Baseline
Test Metric value New value Change
---------------------------------------------------------------------------------------
CoOpt_Read(normal) ghc/alloc 784,107,349 784,014,696 -0.0%
CoOpt_Singletons(normal) ghc/alloc 921,010,885 920,827,416 -0.0%
InstanceMatching(normal) ghc/alloc 5,021,488,306 5,021,564,256 +0.0%
InstanceMatching1(normal) ghc/alloc 27,513,195,552 27,512,182,320 -0.0%
LargeRecord(normal) ghc/alloc 2,945,091,925 2,945,019,736 -0.0%
ManyAlternatives(normal) ghc/alloc 688,812,226 688,682,472 -0.0%
ManyConstructors(normal) ghc/alloc 3,717,067,904 3,717,076,416 +0.0%
MultiComponentModules(normal) ghc/alloc 1,859,847,557 1,858,482,776 -0.1%
MultiComponentModulesRecomp(normal) ghc/alloc 803,386,557 801,979,264 -0.2%
MultiLayerModules(normal) ghc/alloc 3,131,702,544 3,129,216,432 -0.1%
MultiLayerModulesRecomp(normal) ghc/alloc 887,582,074 885,437,552 -0.2%
MultiLayerModulesTH_Make(normal) ghc/alloc 620,757,056 619,758,056 -0.2%
MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,488,042,293 2,408,490,208 -3.2% GOOD
PmSeriesG(normal) ghc/alloc 44,297,818 44,248,704 -0.1%
I suspect this to be real because a deviation of 3% by random chance would be quite unusual.