Skip to content

Cache ConformanceAccessPaths in GSB::EquivalenceClass for big wins #18597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 14, 2018

Conversation

jrose-apple
Copy link
Contributor

@jrose-apple jrose-apple commented Aug 9, 2018

This dramatically speeds up SubstitutionMap::lookupConformance, shaving off 1/3 of the time spent compiling the standard library generating the standard library module.

This dramatically speeds up SubstitutionMap::lookupConformance,
shaving off 1/3 of the time spent compiling the standard library.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test compiler performance

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@@ -976,6 +981,7 @@ ConformanceAccessPath GenericSignature::getConformanceAccessPath(
// Add the root of the path, which starts at this explicit requirement.
path.path.push_back({rootType, conformingProto});
};
buildPath = buildPathLambda;
Copy link
Contributor

@rjmccall rjmccall Aug 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the purpose of binding buildPath specifically as a function_ref here.

Oh, I guess it uses itself recursively? Well, function_ref is better than std::function, at least.

...should this just be hoisted to file scope? This function is huge, and it mostly relies on its parameters, not captures.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would probably work too. I didn't want to modify code I didn't understand too much, but the allocation was bothering me.

@@ -985,6 +991,7 @@ ConformanceAccessPath GenericSignature::getConformanceAccessPath(
buildPath(getRequirements(), source, protocol, rootType, nullptr);

// Return the path; we're done!
equivClass->conformanceAccessPathCache[protocol] = path;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're caching these instead of building them on-demand, can we reasonably return them by reference? Or make ConformanceAccessPath just hold a reference to external storage so that it's cheaper to pass one around?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems sensible too.

@swift-ci
Copy link
Contributor

Build comment file:

Summary for master full

Unexpected test results, excluded stats for RxSwift, ChattoAdditions, ProcedureKitCloud, DatabaseKit, ReactiveSwift, ReactiveCocoa, Wordy

No regressions above thresholds

Debug-batch

debug-batch brief

Regressed (0)
name old new delta delta_pct
Improved (2)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 471,455,336 268,383,628 -203,071,708 -43.07% ✅
time.swift-driver.wall 1116.6s 645.2s -471.5s -42.22% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (0)
name old new delta delta_pct

debug-batch detailed

Regressed (0)
name old new delta delta_pct
Improved (69)
name old new delta delta_pct
AST.NumASTBytesAllocated 12,893,043,413 7,228,592,293 -5,664,451,120 -43.93% ✅
AST.NumDecls 31,829 17,690 -14,139 -44.42% ✅
AST.NumDependencies 81,160 44,831 -36,329 -44.76% ✅
AST.NumImportedExternalDefinitions 731,717 407,142 -324,575 -44.36% ✅
AST.NumInfixOperators 12,815 6,979 -5,836 -45.54% ✅
AST.NumLoadedModules 93,504 52,242 -41,262 -44.13% ✅
AST.NumLocalTypeDecls 13 6 -7 -53.85% ✅
AST.NumObjCMethods 12,269 6,832 -5,437 -44.31% ✅
AST.NumPostfixOperators 14 7 -7 -50.0% ✅
AST.NumPrecedenceGroups 6,612 3,660 -2,952 -44.65% ✅
AST.NumPrefixOperators 60 30 -30 -50.0% ✅
AST.NumReferencedDynamicNames 45 26 -19 -42.22% ✅
AST.NumReferencedMemberNames 1,764,751 975,510 -789,241 -44.72% ✅
AST.NumReferencedTopLevelNames 110,333 61,557 -48,776 -44.21% ✅
AST.NumSourceBuffers 143,635 78,204 -65,431 -45.55% ✅
AST.NumSourceLines 1,164,919 659,029 -505,890 -43.43% ✅
AST.NumSourceLinesPerSecond 656,321 379,918 -276,403 -42.11% ✅
AST.NumTotalClangImportedEntities 2,403,356 1,336,066 -1,067,290 -44.41% ✅
AST.NumUsedConformances 96,844 53,208 -43,636 -45.06% ✅
Driver.ChildrenMaxRSS 33,077,952,512 19,035,455,488 -14,042,497,024 -42.45% ✅
Driver.NumDriverJobsRun 6,745 3,681 -3,064 -45.43% ✅
Driver.NumDriverPipePolls 81,474 44,538 -36,936 -45.33% ✅
Driver.NumDriverPipeReads 84,655 46,074 -38,581 -45.57% ✅
IRModule.NumIRAliases 24,651 13,963 -10,688 -43.36% ✅
IRModule.NumIRBasicBlocks 1,662,799 942,758 -720,041 -43.3% ✅
IRModule.NumIRFunctions 892,440 505,126 -387,314 -43.4% ✅
IRModule.NumIRGlobals 1,053,766 592,589 -461,177 -43.76% ✅
IRModule.NumIRInsts 19,469,035 10,991,656 -8,477,379 -43.54% ✅
IRModule.NumIRNamedMetaData 33,328 18,151 -15,177 -45.54% ✅
IRModule.NumIRValueSymbols 1,689,508 956,620 -732,888 -43.38% ✅
LLVM.NumLLVMBytesOutput 471,455,336 268,383,628 -203,071,708 -43.07% ✅
Parse.NumFunctionsParsed 60,824 34,416 -26,408 -43.42% ✅
SILModule.NumSILGenFunctions 808,335 451,040 -357,295 -44.2% ✅
SILModule.NumSILGenGlobalVariables 14,666 7,687 -6,979 -47.59% ✅
SILModule.NumSILGenVtables 3,680 2,068 -1,612 -43.8% ✅
SILModule.NumSILGenWitnessTables 17,752 9,908 -7,844 -44.19% ✅
SILModule.NumSILOptFunctions 664,305 368,639 -295,666 -44.51% ✅
SILModule.NumSILOptGlobalVariables 15,082 7,938 -7,144 -47.37% ✅
SILModule.NumSILOptVtables 7,070 3,924 -3,146 -44.5% ✅
SILModule.NumSILOptWitnessTables 34,906 19,441 -15,465 -44.3% ✅
Sema.AccessLevelRequest 887,677 504,611 -383,066 -43.15% ✅
Sema.DefaultAndMaxAccessLevelRequest 21,147 12,102 -9,045 -42.77% ✅
Sema.EnumRawTypeRequest 7,630 4,300 -3,330 -43.64% ✅
Sema.ExtendedNominalRequest 1,403,524 787,537 -615,987 -43.89% ✅
Sema.InheritedDeclsReferencedRequest 52,944,226 30,805,715 -22,138,511 -41.81% ✅
Sema.InheritedTypeRequest 26,112 15,792 -10,320 -39.52% ✅
Sema.IsDynamicRequest 686,104 387,463 -298,641 -43.53% ✅
Sema.IsObjCRequest 620,473 350,912 -269,561 -43.44% ✅
Sema.NamedLazyMemberLoadFailureCount 13,185 7,443 -5,742 -43.55% ✅
Sema.NamedLazyMemberLoadSuccessCount 2,274,658 1,334,778 -939,880 -41.32% ✅
Sema.NominalTypeLookupDirectCount 16,439,455 9,919,196 -6,520,259 -39.66% ✅
Sema.NumConformancesDeserialized 2,348,123 1,308,850 -1,039,273 -44.26% ✅
Sema.NumConstraintScopes 7,241,690 3,850,295 -3,391,395 -46.83% ✅
Sema.NumConstraintsConsideredForEdgeContraction 13,049,227 6,756,246 -6,292,981 -48.22% ✅
Sema.NumDeclsDeserialized 15,754,037 8,837,354 -6,916,683 -43.9% ✅
Sema.NumDeclsValidated 989,048 561,320 -427,728 -43.25% ✅
Sema.NumFunctionsTypechecked 429,740 240,960 -188,780 -43.93% ✅
Sema.NumGenericSignatureBuilders 750,608 419,967 -330,641 -44.05% ✅
Sema.NumLazyGenericEnvironments 2,962,233 1,666,824 -1,295,409 -43.73% ✅
Sema.NumLazyGenericEnvironmentsLoaded 294,875 167,813 -127,062 -43.09% ✅
Sema.NumLazyIterableDeclContexts 2,647,653 1,482,377 -1,165,276 -44.01% ✅
Sema.NumTypesDeserialized 16,493,969 9,281,057 -7,212,912 -43.73% ✅
Sema.NumTypesValidated 853,297 481,337 -371,960 -43.59% ✅
Sema.NumUnloadedLazyIterableDeclContexts 1,799,734 1,005,563 -794,171 -44.13% ✅
Sema.OverriddenDeclsRequest 1,411,591 793,784 -617,807 -43.77% ✅
Sema.SetterAccessLevelRequest 52,106 30,375 -21,731 -41.71% ✅
Sema.SuperclassDeclRequest 40,239,465 22,941,260 -17,298,205 -42.99% ✅
Sema.SuperclassTypeRequest 14,766 8,749 -6,017 -40.75% ✅
Sema.UnderlyingTypeDeclsReferencedRequest 2,486,843 2,004,649 -482,194 -19.39% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (18)
name old new delta delta_pct
AST.NumLinkLibraries 0 0 0 0.0%
Driver.DriverDepCascadingDynamic 0 0 0 0.0%
Driver.DriverDepCascadingExternal 0 0 0 0.0%
Driver.DriverDepCascadingMember 0 0 0 0.0%
Driver.DriverDepCascadingNominal 0 0 0 0.0%
Driver.DriverDepCascadingTopLevel 0 0 0 0.0%
Driver.DriverDepDynamic 0 0 0 0.0%
Driver.DriverDepExternal 0 0 0 0.0%
Driver.DriverDepMember 0 0 0 0.0%
Driver.DriverDepNominal 0 0 0 0.0%
Driver.DriverDepTopLevel 0 0 0 0.0%
Driver.NumDriverJobsSkipped 0 0 0 0.0%
Driver.NumProcessFailures 0 0 0 0.0%
Frontend.NumProcessFailures 0 0 0 0.0%
IRModule.NumIRComdatSymbols 0 0 0 0.0%
IRModule.NumIRIFuncs 0 0 0 0.0%
SILModule.NumSILGenDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILOptDefaultWitnessTables 0 0 0 0.0%

Release

release brief

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 458,742,920 458,743,078 158 0.0%
time.swift-driver.wall 2090.0s 2083.5s -6.5s -0.31%

release detailed

Regressed (0)
name old new delta delta_pct
Improved (1)
name old new delta delta_pct
Sema.NumGenericSignatureBuilders 120,174 111,146 -9,028 -7.51% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (22)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 137,101 137,101 0 0.0%
AST.NumLoadedModules 6,178 6,178 0 0.0%
AST.NumTotalClangImportedEntities 440,569 440,569 0 0.0%
AST.NumUsedConformances 99,719 99,719 0 0.0%
IRModule.NumIRBasicBlocks 1,663,827 1,663,827 0 0.0%
IRModule.NumIRFunctions 736,286 736,286 0 0.0%
IRModule.NumIRGlobals 838,108 838,108 0 0.0%
IRModule.NumIRInsts 14,276,171 14,276,171 0 0.0%
IRModule.NumIRValueSymbols 1,426,300 1,426,300 0 0.0%
LLVM.NumLLVMBytesOutput 458,742,920 458,743,078 158 0.0%
SILModule.NumSILGenFunctions 316,537 316,537 0 0.0%
SILModule.NumSILOptFunctions 438,650 438,650 0 0.0%
Sema.NumConformancesDeserialized 1,076,187 1,075,809 -378 -0.04%
Sema.NumConstraintScopes 7,175,345 7,175,345 0 0.0%
Sema.NumDeclsDeserialized 2,929,768 2,927,165 -2,603 -0.09%
Sema.NumDeclsValidated 525,429 525,429 0 0.0%
Sema.NumFunctionsTypechecked 163,144 163,144 0 0.0%
Sema.NumLazyGenericEnvironments 497,450 496,588 -862 -0.17%
Sema.NumLazyGenericEnvironmentsLoaded 56,844 56,844 0 0.0%
Sema.NumLazyIterableDeclContexts 322,256 321,500 -756 -0.23%
Sema.NumTypesDeserialized 3,624,905 3,621,546 -3,359 -0.09%
Sema.NumTypesValidated 266,709 266,709 0 0.0%

@rjmccall
Copy link
Contributor

That looks pretty nice. :)

@jrose-apple
Copy link
Contributor Author

So much so that I'm suspicious! How did it end up outputting less LLVM?

@xedin
Copy link
Contributor

xedin commented Aug 10, 2018

One possible reason is - some of the projects failed while compiling with changes vs. without, is that right, @graydon?

@jrose-apple
Copy link
Contributor Author

It's supposed to ignore that, because if it didn't you'd get no useful data at all if one project fails. But that's my best guess too…

John pointed out that if we're going to cache them, we might as well
go all the way and pass them around by reference.
It's a recursive helper that only captures one argument other than
'this'. Pay the cost of putting a declaration in a commonly-included
header to simplify the code.

No intended functionality change.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

@rjmccall
Copy link
Contributor

That looks great, thanks!

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@graydon
Copy link
Contributor

graydon commented Aug 10, 2018

@xedin @jrose-apple I don't know how this is happening (it is indeed supposed to be ignoring cases that failed when computing deltas!) but those stats are definitely indicative of a measurement error. If you look at the detailed-stats deltas, it's counting the intake of 43% less source-lines of code (AST.NumSourceLines); everything else follows from that.

@graydon
Copy link
Contributor

graydon commented Aug 10, 2018

(Slightly more-nuanced read: the patch breaks non-WMO builds of a few projects. The actual improvement is seen in the release detailed counters -- Sema.NumGenericSignatureBuilders decreases by 7.5% -- with no improvement to time or space enough to register above threshold in the brief summary)

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@jrose-apple
Copy link
Contributor Author

Yep, looks like segfaults while building some things. Hm.

@jrose-apple
Copy link
Contributor Author

All right, let's try this again:

@swift-ci Please test compiler performance

@swift-ci
Copy link
Contributor

!!! Couldn't read commit file !!!

@graydon
Copy link
Contributor

graydon commented Aug 13, 2018

@swift-ci Please test compiler performance

@jrose-apple
Copy link
Contributor Author

There are still more projects failing to build in Debug mode. I'm looking into that today.

@swift-ci
Copy link
Contributor

Build comment file:

Summary for master full

Unexpected test results, excluded stats for RxSwift, ChattoAdditions, ProcedureKitCloud, DatabaseKit, ReactiveSwift, ReactiveCocoa, Wordy

No regressions above thresholds

Debug-batch

debug-batch brief

Regressed (0)
name old new delta delta_pct
Improved (3)
name old new delta delta_pct
Frontend.NumInstructions 4,976,984,136,175 1,142,411,362,457 -3,834,572,773,718 -77.05% ✅
LLVM.NumLLVMBytesOutput 273,254,484 66,086,672 -207,167,812 -75.81% ✅
time.swift-driver.wall 562.2s 132.9s -429.3s -76.35% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (0)
name old new delta delta_pct

debug-batch detailed

Regressed (0)
name old new delta delta_pct
Improved (70)
name old new delta delta_pct
AST.NumASTBytesAllocated 6,024,060,487 1,349,120,153 -4,674,940,334 -77.6% ✅
AST.NumDecls 17,690 3,552 -14,138 -79.92% ✅
AST.NumDependencies 34,312 6,614 -27,698 -80.72% ✅
AST.NumImportedExternalDefinitions 344,392 74,694 -269,698 -78.31% ✅
AST.NumInfixOperators 6,979 1,143 -5,836 -83.62% ✅
AST.NumLoadedModules 40,802 8,715 -32,087 -78.64% ✅
AST.NumLocalTypeDecls 6 0 -6 -100.0% ✅
AST.NumObjCMethods 6,832 1,395 -5,437 -79.58% ✅
AST.NumPostfixOperators 7 0 -7 -100.0% ✅
AST.NumPrecedenceGroups 3,660 708 -2,952 -80.66% ✅
AST.NumPrefixOperators 30 0 -30 -100.0% ✅
AST.NumReferencedDynamicNames 26 8 -18 -69.23% ✅
AST.NumReferencedMemberNames 977,197 189,580 -787,617 -80.6% ✅
AST.NumReferencedTopLevelNames 61,631 12,806 -48,825 -79.22% ✅
AST.NumSourceBuffers 54,558 9,310 -45,248 -82.94% ✅
AST.NumSourceLines 659,029 153,139 -505,890 -76.76% ✅
AST.NumSourceLinesPerSecond 420,162 105,124 -315,038 -74.98% ✅
AST.NumTotalClangImportedEntities 1,143,794 246,607 -897,187 -78.44% ✅
AST.NumUsedConformances 53,208 9,572 -43,636 -82.01% ✅
Driver.ChildrenMaxRSS 18,355,200,000 3,767,390,208 -14,587,809,792 -79.48% ✅
Driver.NumDriverJobsRun 3,681 618 -3,063 -83.21% ✅
Driver.NumDriverPipePolls 42,670 6,857 -35,813 -83.93% ✅
Driver.NumDriverPipeReads 43,319 6,560 -36,759 -84.86% ✅
Frontend.NumInstructions 4,976,984,136,175 1,142,411,362,457 -3,834,572,773,718 -77.05% ✅
IRModule.NumIRAliases 13,963 3,275 -10,688 -76.55% ✅
IRModule.NumIRBasicBlocks 950,635 223,813 -726,822 -76.46% ✅
IRModule.NumIRFunctions 512,906 119,042 -393,864 -76.79% ✅
IRModule.NumIRGlobals 613,486 134,702 -478,784 -78.04% ✅
IRModule.NumIRInsts 11,112,118 2,532,643 -8,579,475 -77.21% ✅
IRModule.NumIRNamedMetaData 18,151 2,975 -15,176 -83.61% ✅
IRModule.NumIRValueSymbols 978,517 227,154 -751,363 -76.79% ✅
LLVM.NumLLVMBytesOutput 273,254,484 66,086,672 -207,167,812 -75.81% ✅
Parse.NumFunctionsParsed 34,416 8,008 -26,408 -76.73% ✅
SILModule.NumSILGenFunctions 503,658 101,643 -402,015 -79.82% ✅
SILModule.NumSILGenGlobalVariables 7,687 709 -6,978 -90.78% ✅
SILModule.NumSILGenVtables 2,068 457 -1,611 -77.9% ✅
SILModule.NumSILGenWitnessTables 9,971 2,065 -7,906 -79.29% ✅
SILModule.NumSILOptFunctions 375,759 74,164 -301,595 -80.26% ✅
SILModule.NumSILOptGlobalVariables 7,938 794 -7,144 -90.0% ✅
SILModule.NumSILOptVtables 3,924 778 -3,146 -80.17% ✅
SILModule.NumSILOptWitnessTables 19,504 3,977 -15,527 -79.61% ✅
Sema.AccessLevelRequest 460,753 112,460 -348,293 -75.59% ✅
Sema.DefaultAndMaxAccessLevelRequest 10,884 2,751 -8,133 -74.72% ✅
Sema.EnumRawTypeRequest 3,608 832 -2,776 -76.94% ✅
Sema.ExtendedNominalRequest 642,837 147,620 -495,217 -77.04% ✅
Sema.InheritedDeclsReferencedRequest 28,598,062 8,161,454 -20,436,608 -71.46% ✅
Sema.InheritedTypeRequest 13,251 4,372 -8,879 -67.01% ✅
Sema.IsDynamicRequest 360,515 83,714 -276,801 -76.78% ✅
Sema.IsObjCRequest 324,259 75,566 -248,693 -76.7% ✅
Sema.NamedLazyMemberLoadFailureCount 6,666 1,636 -5,030 -75.46% ✅
Sema.NamedLazyMemberLoadSuccessCount 1,148,162 379,159 -769,003 -66.98% ✅
Sema.NominalTypeLookupDirectCount 9,216,577 3,203,146 -6,013,431 -65.25% ✅
Sema.NumConformancesDeserialized 1,164,798 248,242 -916,556 -78.69% ✅
Sema.NumConstraintScopes 3,832,586 456,573 -3,376,013 -88.09% ✅
Sema.NumConstraintsConsideredForEdgeContraction 6,721,329 458,760 -6,262,569 -93.17% ✅
Sema.NumDeclsDeserialized 7,530,278 1,707,927 -5,822,351 -77.32% ✅
Sema.NumDeclsValidated 522,769 125,200 -397,569 -76.05% ✅
Sema.NumFunctionsTypechecked 213,054 48,546 -164,508 -77.21% ✅
Sema.NumGenericSignatureBuilders 356,359 85,513 -270,846 -76.0% ✅
Sema.NumLazyGenericEnvironments 1,398,207 324,629 -1,073,578 -76.78% ✅
Sema.NumLazyGenericEnvironmentsLoaded 143,759 34,976 -108,783 -75.67% ✅
Sema.NumLazyIterableDeclContexts 1,207,026 273,164 -933,862 -77.37% ✅
Sema.NumTypesDeserialized 3,369,275 775,515 -2,593,760 -76.98% ✅
Sema.NumTypesValidated 432,049 99,766 -332,283 -76.91% ✅
Sema.NumUnloadedLazyIterableDeclContexts 796,275 178,131 -618,144 -77.63% ✅
Sema.OverriddenDeclsRequest 718,845 162,811 -556,034 -77.35% ✅
Sema.SetterAccessLevelRequest 28,380 8,240 -20,140 -70.97% ✅
Sema.SuperclassDeclRequest 21,597,384 5,405,945 -16,191,439 -74.97% ✅
Sema.SuperclassTypeRequest 8,094 2,424 -5,670 -70.05% ✅
Sema.UnderlyingTypeDeclsReferencedRequest 1,822,912 1,370,762 -452,150 -24.8% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (18)
name old new delta delta_pct
AST.NumLinkLibraries 0 0 0 0.0%
Driver.DriverDepCascadingDynamic 0 0 0 0.0%
Driver.DriverDepCascadingExternal 0 0 0 0.0%
Driver.DriverDepCascadingMember 0 0 0 0.0%
Driver.DriverDepCascadingNominal 0 0 0 0.0%
Driver.DriverDepCascadingTopLevel 0 0 0 0.0%
Driver.DriverDepDynamic 0 0 0 0.0%
Driver.DriverDepExternal 0 0 0 0.0%
Driver.DriverDepMember 0 0 0 0.0%
Driver.DriverDepNominal 0 0 0 0.0%
Driver.DriverDepTopLevel 0 0 0 0.0%
Driver.NumDriverJobsSkipped 0 0 0 0.0%
Driver.NumProcessFailures 0 0 0 0.0%
Frontend.NumProcessFailures 0 0 0 0.0%
IRModule.NumIRComdatSymbols 0 0 0 0.0%
IRModule.NumIRIFuncs 0 0 0 0.0%
SILModule.NumSILGenDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILOptDefaultWitnessTables 0 0 0 0.0%

Release

release brief

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (3)
name old new delta delta_pct
Frontend.NumInstructions 11,860,035,791,300 11,845,379,693,203 -14,656,098,097 -0.12%
LLVM.NumLLVMBytesOutput 458,764,638 458,764,618 -20 -0.0%
time.swift-driver.wall 1880.1s 1881.7s 1.6s 0.09%

release detailed

Regressed (0)
name old new delta delta_pct
Improved (1)
name old new delta delta_pct
Sema.NumGenericSignatureBuilders 120,174 111,524 -8,650 -7.2% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (22)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 137,101 137,101 0 0.0%
AST.NumLoadedModules 6,178 6,178 0 0.0%
AST.NumTotalClangImportedEntities 440,555 440,555 0 0.0%
AST.NumUsedConformances 99,719 99,719 0 0.0%
IRModule.NumIRBasicBlocks 1,663,659 1,663,659 0 0.0%
IRModule.NumIRFunctions 736,266 736,266 0 0.0%
IRModule.NumIRGlobals 838,343 838,343 0 0.0%
IRModule.NumIRInsts 14,286,700 14,286,700 0 0.0%
IRModule.NumIRValueSymbols 1,426,516 1,426,516 0 0.0%
LLVM.NumLLVMBytesOutput 458,764,638 458,764,618 -20 -0.0%
SILModule.NumSILGenFunctions 316,536 316,536 0 0.0%
SILModule.NumSILOptFunctions 438,647 438,647 0 0.0%
Sema.NumConformancesDeserialized 1,076,187 1,076,187 0 0.0%
Sema.NumConstraintScopes 7,175,345 7,175,345 0 0.0%
Sema.NumDeclsDeserialized 2,904,957 2,904,957 0 0.0%
Sema.NumDeclsValidated 525,429 525,429 0 0.0%
Sema.NumFunctionsTypechecked 163,144 163,144 0 0.0%
Sema.NumLazyGenericEnvironments 490,242 490,242 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 56,833 56,833 0 0.0%
Sema.NumLazyIterableDeclContexts 319,942 319,942 0 0.0%
Sema.NumTypesDeserialized 1,827,999 1,827,999 0 0.0%
Sema.NumTypesValidated 266,709 266,709 0 0.0%

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. I had this on a TODO list somewhere as a lower-priority optimization but never imagined it would be such a win. Thank you!

@jrose-apple
Copy link
Contributor Author

Okay, a few more of those Debug projects should pass now, but still not all of them, so I'm just going to merge this.

@jrose-apple jrose-apple merged commit 910894a into swiftlang:master Aug 14, 2018
@jrose-apple jrose-apple deleted the well-worn-path branch August 14, 2018 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants