-
Notifications
You must be signed in to change notification settings - Fork 10.5k
SR-946 - Unify mutexes in the Swift runtime #1731
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
Conversation
@gparker42 @jckarter - had to create a new PR because of a gaffe on my end 😞 |
reportError( pthread_mutexattr_init(&attr) ); | ||
reportError( pthread_mutexattr_settype(&attr, kind) ); | ||
reportError( pthread_mutex_init(&PThreadMutex, &attr) ); | ||
reportError( pthread_mutexattr_destroy(&attr) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces around parens in calls are not typical for LLVM style. Would you mind running clang-format on the new code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I should have known about clang-format.
@swift-ci Please test |
@shawnce This looks great to me. Thanks for putting up with my nitpicks. |
Is this good to merge? @jckarter ...should I hoist the non-error pathway aspect of lock, unlock, and try_lock into the header since we are already exposing pthread via a #ifdef? It doesn't likely make much sense given the optimized code output I am seeing and it makes the code uglier... |
@shawnce Instead of introducing the needless clang-format commit, can you use git-clang-format on the individual patches. The clang-format commit does not add anything of value. If you are not familiar with git-clang-format: https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/git-clang-format I use it all of the time, it is great. |
Leaving the checks in the .cpp file is fine. We'll probably start LTO-ing the runtime and stdlib together at some point, so I wouldn't worry too much about finessing the header/impl split. |
@gribozavr (or anyone) does this PR need a final CI run before it can merged? |
Just triggering the CI, not a review: @swift-ci Please test |
@swift-ci Please benchmark |
Build comment file:Optimized (O)
|
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 4808 | 5723 | +19.0% | 0.84x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 153870 | 178571 | +16.1% | 0.86x(?) |
SevenBoom | 1358 | 1490 | +9.7% | 0.91x |
ObjectiveCBridgeStubFromArrayOfNSString | 139876 | 151484 | +8.3% | 0.92x |
NSError | 363 | 391 | +7.7% | 0.93x(?) |
Improvement (3)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ObjectiveCBridgeFromNSArrayAnyObjectForced | 4079 | 3836 | -6.0% | 1.06x(?) |
ObjectAllocation | 161 | 151 | -6.2% | 1.07x(?) |
ObjectiveCBridgeFromNSArrayAnyObject | 78575 | 70822 | -9.9% | 1.11x |
No Changes (106)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
Histogram | 791 | 750 | -5.2% | 1.05x |
ErrorHandling | 3002 | 2855 | -4.9% | 1.05x(?) |
ObjectiveCBridgeToNSSet | 26480 | 25196 | -4.8% | 1.05x(?) |
StaticArray | 3008 | 2906 | -3.4% | 1.04x(?) |
DictionaryLiteral | 3689 | 3550 | -3.8% | 1.04x |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 134076 | 128465 | -4.2% | 1.04x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObject | 291321 | 282018 | -3.2% | 1.03x(?) |
ObjectiveCBridgeStubToArrayOfNSString | 31940 | 30956 | -3.1% | 1.03x(?) |
ObjectiveCBridgeFromNSString | 1683 | 1632 | -3.0% | 1.03x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 202992 | 199344 | -1.8% | 1.02x(?) |
TwoSum | 1693 | 1665 | -1.6% | 1.02x(?) |
PopFrontArray | 2003 | 1984 | -0.9% | 1.01x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 277873 | 273781 | -1.5% | 1.01x(?) |
Prims | 756 | 751 | -0.7% | 1.01x(?) |
SortLettersInPlace | 1056 | 1045 | -1.0% | 1.01x |
DictionarySwap | 799 | 791 | -1.0% | 1.01x |
Dictionary3OfObjects | 1843 | 1830 | -0.7% | 1.01x(?) |
ObjectiveCBridgeStubFromNSString | 795 | 787 | -1.0% | 1.01x(?) |
ArrayOfRef | 3501 | 3470 | -0.9% | 1.01x(?) |
Dictionary | 1936 | 1924 | -0.6% | 1.01x |
ArrayOfGenericRef | 3551 | 3530 | -0.6% | 1.01x(?) |
ArraySubscript | 1425 | 1421 | -0.3% | 1.00x(?) |
DictionarySwapOfObjects | 8936 | 8924 | -0.1% | 1.00x(?) |
StackPromo | 20469 | 20561 | +0.5% | 1.00x(?) |
RecursiveOwnedParameter | 1982 | 1983 | +0.1% | 1.00x |
ClassArrayGetter | 15 | 15 | +0.0% | 1.00x |
Array2D | 2807 | 2806 | -0.0% | 1.00x(?) |
SortStrings | 1882 | 1888 | +0.3% | 1.00x |
OpenClose | 71 | 71 | +0.0% | 1.00x |
StringWithCString | 79281 | 79326 | +0.1% | 1.00x(?) |
ObjectiveCBridgeFromNSStringForced | 2373 | 2380 | +0.3% | 1.00x(?) |
ByteSwap | 1 | 1 | +0.0% | 1.00x |
XorLoop | 405 | 406 | +0.2% | 1.00x(?) |
StringInterpolation | 9578 | 9579 | +0.0% | 1.00x(?) |
Integrate | 247 | 246 | -0.4% | 1.00x(?) |
113 | 3174181 | 3161604 | -0.4% | 1.00x |
ProtocolDispatch | 3158 | 3156 | -0.1% | 1.00x(?) |
TypeFlood | 0 | 0 | +0.0% | 1.00x |
ObjectiveCBridgeFromNSSetAnyObject | 131148 | 131646 | +0.4% | 1.00x(?) |
ProtocolDispatch2 | 152 | 152 | +0.0% | 1.00x |
Walsh | 364 | 363 | -0.3% | 1.00x |
Dictionary3 | 1229 | 1235 | +0.5% | 1.00x(?) |
Dictionary2 | 3312 | 3318 | +0.2% | 1.00x(?) |
StrComplexWalk | 3204 | 3189 | -0.5% | 1.00x(?) |
SetIntersect_OfObjects | 3501 | 3506 | +0.1% | 1.00x(?) |
ObjectiveCBridgeToNSArray | 30777 | 30782 | +0.0% | 1.00x(?) |
PopFrontUnsafePointer | 8725 | 8713 | -0.1% | 1.00x(?) |
CaptureProp | 5739 | 5740 | +0.0% | 1.00x(?) |
PolymorphicCalls | 104 | 104 | +0.0% | 1.00x |
Calculator | 41 | 41 | +0.0% | 1.00x |
MapReduce | 418 | 418 | +0.0% | 1.00x |
Hanoi | 3598 | 3596 | -0.1% | 1.00x(?) |
DictionaryRemoveOfObjects | 20266 | 20251 | -0.1% | 1.00x(?) |
UTF8Decode | 331 | 331 | +0.0% | 1.00x |
SetIsSubsetOf | 508 | 508 | +0.0% | 1.00x |
NopDeinit | 35237 | 35091 | -0.4% | 1.00x |
SetIntersect | 1097 | 1095 | -0.2% | 1.00x(?) |
RGBHistogramOfObjects | 25826 | 25921 | +0.4% | 1.00x(?) |
StringBuilder | 1290 | 1289 | -0.1% | 1.00x |
ArrayInClass | 91 | 91 | +0.0% | 1.00x |
Phonebook | 11431 | 11420 | -0.1% | 1.00x |
Sim2DArray | 791 | 791 | +0.0% | 1.00x |
SetExclusiveOr_OfObjects | 13661 | 13676 | +0.1% | 1.00x(?) |
ObjectiveCBridgeToNSDictionary | 26371 | 26491 | +0.5% | 1.00x(?) |
MonteCarloPi | 44198 | 44196 | -0.0% | 1.00x(?) |
MonteCarloE | 10511 | 10510 | -0.0% | 1.00x(?) |
SetUnion_OfObjects | 10932 | 10901 | -0.3% | 1.00x(?) |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
HashTest | 1691 | 1694 | +0.2% | 1.00x(?) |
SetIsSubsetOf_OfObjects | 661 | 661 | +0.0% | 1.00x |
ArrayAppend | 764 | 763 | -0.1% | 1.00x(?) |
DictionaryRemove | 4819 | 4826 | +0.1% | 1.00x(?) |
LinkedList | 9668 | 9689 | +0.2% | 1.00x(?) |
NSStringConversion | 640 | 640 | +0.0% | 1.00x |
RGBHistogram | 3234 | 3232 | -0.1% | 1.00x(?) |
ArrayAppendReserved | 516 | 516 | +0.0% | 1.00x |
SetUnion | 3758 | 3742 | -0.4% | 1.00x |
Chars | 848 | 848 | +0.0% | 1.00x |
StrToInt | 4282 | 4282 | +0.0% | 1.00x |
DeadArray | 200 | 200 | +0.0% | 1.00x |
BitCount | 19 | 19 | +0.0% | 1.00x |
AngryPhonebook | 0 | 0 | +0.0% | 1.00x |
StringWalk | 5139 | 5138 | -0.0% | 1.00x(?) |
ArrayValueProp | 8 | 8 | +0.0% | 1.00x |
RC4 | 225 | 225 | +0.0% | 1.00x |
Memset | 214 | 213 | -0.5% | 1.00x(?) |
Dictionary2OfObjects | 5109 | 5128 | +0.4% | 1.00x(?) |
ArrayValueProp4 | 8 | 8 | +0.0% | 1.00x |
ArrayValueProp2 | 8 | 8 | +0.0% | 1.00x |
ArrayValueProp3 | 8 | 8 | +0.0% | 1.00x |
ObjectiveCBridgeToNSString | 1054 | 1064 | +0.9% | 0.99x(?) |
ObjectiveCBridgeStubToNSString | 1386 | 1395 | +0.7% | 0.99x(?) |
RangeAssignment | 333 | 336 | +0.9% | 0.99x(?) |
ArrayLiteral | 1016 | 1029 | +1.3% | 0.99x |
Join | 436 | 439 | +0.7% | 0.99x |
PopFrontArrayGeneric | 1992 | 2020 | +1.4% | 0.99x |
SetExclusiveOr | 4065 | 4114 | +1.2% | 0.99x |
DictionaryOfObjects | 4160 | 4250 | +2.2% | 0.98x(?) |
ArrayOfGenericPOD | 219 | 223 | +1.8% | 0.98x(?) |
NSDictionaryCastToSwift | 11446 | 11705 | +2.3% | 0.98x(?) |
ObjectiveCBridgeFromNSSetAnyObjectForced | 4262 | 4368 | +2.5% | 0.98x(?) |
ArrayOfPOD | 182 | 185 | +1.6% | 0.98x(?) |
SuperChars | 573057 | 593753 | +3.6% | 0.97x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 194124 | 201406 | +3.8% | 0.96x(?) |
DictionaryBridge | 5485 | 5691 | +3.8% | 0.96x |
ObjectiveCBridgeFromNSSetAnyObjectToString | 232616 | 241916 | +4.0% | 0.96x(?) |
Regression (3)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 8589 | 9572 | +11.4% | 0.90x(?) |
TypeFlood | 147 | 159 | +8.2% | 0.92x |
SevenBoom | 1489 | 1621 | +8.9% | 0.92x |
Improvement (25)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
Join | 1403 | 1325 | -5.6% | 1.06x |
CaptureProp | 56305 | 53181 | -5.5% | 1.06x |
DictionaryRemoveOfObjects | 75088 | 70509 | -6.1% | 1.06x |
NSDictionaryCastToSwift | 14075 | 13266 | -5.8% | 1.06x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 208556 | 196492 | -5.8% | 1.06x(?) |
SetIsSubsetOf_OfObjects | 3335 | 3112 | -6.7% | 1.07x |
PopFrontArrayGeneric | 14529 | 13511 | -7.0% | 1.08x |
SetExclusiveOr | 57056 | 53056 | -7.0% | 1.08x |
StringBuilder | 9412 | 8712 | -7.4% | 1.08x |
SetIntersect_OfObjects | 22126 | 20348 | -8.0% | 1.09x |
DictionaryLiteral | 23984 | 21989 | -8.3% | 1.09x |
SetIsSubsetOf | 3560 | 3275 | -8.0% | 1.09x(?) |
SetIntersect | 23048 | 21084 | -8.5% | 1.09x |
Histogram | 16807 | 15324 | -8.8% | 1.10x |
DictionaryOfObjects | 10387 | 9457 | -8.9% | 1.10x |
ObjectiveCBridgeFromNSSetAnyObjectForced | 8974 | 8158 | -9.1% | 1.10x(?) |
AngryPhonebook | 4020 | 3639 | -9.5% | 1.10x |
ObjectiveCBridgeToNSDictionary | 27878 | 25088 | -10.0% | 1.11x(?) |
ObjectiveCBridgeFromNSArrayAnyObject | 83553 | 74027 | -11.4% | 1.13x |
Phonebook | 72705 | 64341 | -11.5% | 1.13x(?) |
RGBHistogram | 63228 | 55427 | -12.3% | 1.14x |
SortLettersInPlace | 2904 | 2360 | -18.7% | 1.23x |
NSStringConversion | 3463 | 2811 | -18.8% | 1.23x(?) |
Chars | 72163 | 57871 | -19.8% | 1.25x |
SortStrings | 8791 | 5918 | -32.7% | 1.49x |
No Changes (86)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 299232 | 284448 | -4.9% | 1.05x |
ObjectiveCBridgeToNSSet | 26918 | 25684 | -4.6% | 1.05x(?) |
SetUnion | 39580 | 37583 | -5.0% | 1.05x |
DictionarySwapOfObjects | 30882 | 29684 | -3.9% | 1.04x |
ErrorHandling | 8328 | 8009 | -3.8% | 1.04x(?) |
SetExclusiveOr_OfObjects | 75232 | 72270 | -3.9% | 1.04x(?) |
TwoSum | 11935 | 11469 | -3.9% | 1.04x(?) |
Prims | 15626 | 15239 | -2.5% | 1.03x |
PopFrontArray | 14818 | 14331 | -3.3% | 1.03x |
StrComplexWalk | 9118 | 8829 | -3.2% | 1.03x |
MapReduce | 47888 | 46447 | -3.0% | 1.03x(?) |
SetUnion_OfObjects | 56419 | 54927 | -2.6% | 1.03x |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 204479 | 200549 | -1.9% | 1.02x(?) |
SuperChars | 820466 | 800654 | -2.4% | 1.02x(?) |
113 | 6289117 | 6141625 | -2.4% | 1.02x |
ProtocolDispatch | 6292 | 6185 | -1.7% | 1.02x(?) |
ObjectAllocation | 1443 | 1415 | -1.9% | 1.02x(?) |
Dictionary | 5991 | 5883 | -1.8% | 1.02x(?) |
ObjectiveCBridgeStubFromArrayOfNSString | 144891 | 141626 | -2.2% | 1.02x(?) |
ArrayValueProp2 | 20741 | 20311 | -2.1% | 1.02x |
ObjectiveCBridgeToNSString | 1084 | 1077 | -0.7% | 1.01x(?) |
Dictionary3OfObjects | 3694 | 3652 | -1.1% | 1.01x(?) |
RangeAssignment | 16849 | 16630 | -1.3% | 1.01x(?) |
ObjectiveCBridgeFromNSSetAnyObject | 143001 | 142282 | -0.5% | 1.01x(?) |
Walsh | 13667 | 13491 | -1.3% | 1.01x(?) |
PolymorphicCalls | 1140 | 1131 | -0.8% | 1.01x(?) |
Calculator | 1015 | 1007 | -0.8% | 1.01x |
UTF8Decode | 41714 | 41225 | -1.2% | 1.01x(?) |
StrToInt | 18713 | 18608 | -0.6% | 1.01x |
HashTest | 6118 | 6084 | -0.6% | 1.01x(?) |
ArrayValueProp3 | 2775 | 2743 | -1.1% | 1.01x(?) |
MonteCarloPi | 53464 | 53467 | +0.0% | 1.00x(?) |
RecursiveOwnedParameter | 10954 | 10952 | -0.0% | 1.00x(?) |
ObjectiveCBridgeStubToNSString | 1741 | 1735 | -0.3% | 1.00x(?) |
ClassArrayGetter | 1352 | 1352 | +0.0% | 1.00x |
Array2D | 765117 | 765504 | +0.1% | 1.00x(?) |
DictionaryBridge | 5646 | 5656 | +0.2% | 1.00x(?) |
StringWithCString | 344864 | 344846 | -0.0% | 1.00x(?) |
DictionarySwap | 15148 | 15171 | +0.1% | 1.00x(?) |
ArrayOfGenericPOD | 4187 | 4171 | -0.4% | 1.00x |
ByteSwap | 9 | 9 | +0.0% | 1.00x |
XorLoop | 19597 | 19594 | -0.0% | 1.00x(?) |
Integrate | 385 | 384 | -0.3% | 1.00x(?) |
ObjectiveCBridgeStubFromNSString | 1247 | 1250 | +0.2% | 1.00x(?) |
ProtocolDispatch2 | 457 | 457 | +0.0% | 1.00x |
Dictionary2 | 6809 | 6836 | +0.4% | 1.00x(?) |
ArrayOfRef | 10634 | 10635 | +0.0% | 1.00x(?) |
ArrayAppend | 3274 | 3264 | -0.3% | 1.00x(?) |
NSError | 676 | 673 | -0.4% | 1.00x(?) |
PopFrontUnsafePointer | 108363 | 108391 | +0.0% | 1.00x(?) |
Hanoi | 24785 | 24778 | -0.0% | 1.00x(?) |
OpenClose | 449 | 449 | +0.0% | 1.00x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 157517 | 156968 | -0.3% | 1.00x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToString | 248988 | 249209 | +0.1% | 1.00x(?) |
ArrayInClass | 3905 | 3905 | +0.0% | 1.00x |
ArrayOfGenericRef | 11380 | 11347 | -0.3% | 1.00x |
Sim2DArray | 14049 | 14048 | -0.0% | 1.00x(?) |
MonteCarloE | 101131 | 101444 | +0.3% | 1.00x |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
DictionaryRemove | 37529 | 37451 | -0.2% | 1.00x(?) |
RGBHistogramOfObjects | 108857 | 108539 | -0.3% | 1.00x(?) |
ArrayAppendReserved | 3010 | 3016 | +0.2% | 1.00x(?) |
ArrayOfPOD | 2491 | 2489 | -0.1% | 1.00x(?) |
BitCount | 101 | 101 | +0.0% | 1.00x |
ArrayLiteral | 1107 | 1108 | +0.1% | 1.00x(?) |
StringWalk | 23274 | 23263 | -0.1% | 1.00x(?) |
ArrayValueProp | 2331 | 2341 | +0.4% | 1.00x(?) |
RC4 | 9347 | 9378 | +0.3% | 1.00x(?) |
Memset | 20600 | 20601 | +0.0% | 1.00x(?) |
ArrayValueProp4 | 2700 | 2688 | -0.4% | 1.00x |
ArraySubscript | 4875 | 4904 | +0.6% | 0.99x(?) |
ObjectiveCBridgeFromNSStringForced | 2778 | 2812 | +1.2% | 0.99x(?) |
ObjectiveCBridgeToNSArray | 30825 | 31104 | +0.9% | 0.99x(?) |
ObjectiveCBridgeStubToArrayOfNSString | 32219 | 32647 | +1.3% | 0.99x(?) |
LinkedList | 27575 | 27754 | +0.7% | 0.99x |
StringInterpolation | 12631 | 12940 | +2.5% | 0.98x(?) |
Dictionary3 | 2785 | 2851 | +2.4% | 0.98x(?) |
ObjectiveCBridgeFromNSString | 5669 | 5766 | +1.7% | 0.98x(?) |
StaticArray | 19551 | 20214 | +3.4% | 0.97x(?) |
Dictionary2OfObjects | 8602 | 8848 | +2.9% | 0.97x |
ObjectiveCBridgeFromNSDictionaryAnyObject | 284245 | 296468 | +4.3% | 0.96x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 142898 | 149539 | +4.7% | 0.96x |
DeadArray | 109420 | 113392 | +3.6% | 0.96x |
StackPromo | 83506 | 87629 | +4.9% | 0.95x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectForced | 8385 | 8807 | +5.0% | 0.95x(?) |
NopDeinit | 75179 | 78973 | +5.0% | 0.95x(?) |
|
||
#ifdef SWIFT_RUNTIME_MUTEX_HAVE_PHTREADS | ||
#include <pthread.h> | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have an #else #error
branch here so that people porting to non-pthread platforms know they have some work to do here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update
LGTM, if you add an |
@shawnce Please take a look at the Linux timeout when you have time. |
@gribozavr the Linux timeout isn't obvious based on console output, does a timeout trigger a dump / backtrace of the affected process (or can it)? It isn't clear what test runner may have been stuck (assuming mutex related tests for now). This passed on linux just fine a couple of times in prior runs. I will eyeball the multithreaded tests to see if I can figure out anything that could be wrong... not sure how to debug otherwise, I guess I could try to spin up a Linux VM. |
Let's give it another spin: @swift-ci Please test Linux platform |
Are the benchmark numbers relative to master head or when I branched off of master? I guess CI may actually build off a temporary branch of my changes merged onto master? |
Benchmark job clones current master and runs benchmark test on it. After, it will run benchmark on |
- cleaned up private scoping - removed generally unneeded API - fix defect in unit tests causing stuck threads
@gribozavr unit test issue should be fixed, I was getting a little tricky in my test and introduced a bug that could cause it never finish. |
@swift-ci Please test |
Build comment file:Optimized (O)
|
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
Dictionary2OfObjects | 4905 | 5774 | +17.7% | 0.85x |
Integrate | 225 | 245 | +8.9% | 0.92x |
ErrorHandling | 2659 | 2849 | +7.2% | 0.93x |
HashTest | 1587 | 1696 | +6.9% | 0.94x |
Improvement (1)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
PopFrontArray | 1220 | 1060 | -13.1% | 1.15x(?) |
No Changes (109)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
Calculator | 36 | 35 | -2.8% | 1.03x |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 164960 | 160187 | -2.9% | 1.03x(?) |
ObjectiveCBridgeToNSDictionary | 18120 | 17822 | -1.6% | 1.02x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 107853 | 106168 | -1.6% | 1.02x(?) |
ArraySubscript | 1349 | 1341 | -0.6% | 1.01x(?) |
Array2D | 2083 | 2065 | -0.9% | 1.01x(?) |
ObjectiveCBridgeStubFromNSString | 689 | 680 | -1.3% | 1.01x |
StaticArray | 2695 | 2658 | -1.4% | 1.01x(?) |
ObjectiveCBridgeFromNSSetAnyObject | 112722 | 111929 | -0.7% | 1.01x(?) |
ObjectiveCBridgeToNSArray | 29213 | 28964 | -0.8% | 1.01x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 123667 | 121988 | -1.4% | 1.01x(?) |
ObjectiveCBridgeStubToArrayOfNSString | 29335 | 29057 | -0.9% | 1.01x(?) |
NSDictionaryCastToSwift | 11162 | 11006 | -1.4% | 1.01x(?) |
NSStringConversion | 575 | 571 | -0.7% | 1.01x |
StrToInt | 3603 | 3566 | -1.0% | 1.01x(?) |
ObjectiveCBridgeToNSString | 1011 | 1012 | +0.1% | 1.00x(?) |
StackPromo | 18963 | 18958 | -0.0% | 1.00x(?) |
RecursiveOwnedParameter | 1829 | 1829 | +0.0% | 1.00x |
ObjectiveCBridgeStubToNSString | 1367 | 1367 | +0.0% | 1.00x |
ClassArrayGetter | 12 | 12 | +0.0% | 1.00x |
SortStrings | 1587 | 1591 | +0.2% | 1.00x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 4514 | 4523 | +0.2% | 1.00x(?) |
ArrayOfGenericPOD | 208 | 208 | +0.0% | 1.00x |
StringWithCString | 76023 | 75995 | -0.0% | 1.00x(?) |
Prims | 731 | 733 | +0.3% | 1.00x(?) |
SortLettersInPlace | 1011 | 1015 | +0.4% | 1.00x(?) |
Dictionary3OfObjects | 1751 | 1757 | +0.3% | 1.00x |
ByteSwap | 0 | 0 | +0.0% | 1.00x |
SuperChars | 561016 | 558415 | -0.5% | 1.00x |
XorLoop | 358 | 358 | +0.0% | 1.00x |
113 | 2602295 | 2609071 | +0.3% | 1.00x |
ProtocolDispatch | 2869 | 2870 | +0.0% | 1.00x(?) |
TypeFlood | 0 | 0 | +0.0% | 1.00x |
ArrayLiteral | 974 | 974 | +0.0% | 1.00x |
ProtocolDispatch2 | 153 | 153 | +0.0% | 1.00x |
StrComplexWalk | 2529 | 2521 | -0.3% | 1.00x(?) |
SetIntersect_OfObjects | 3260 | 3263 | +0.1% | 1.00x(?) |
Join | 408 | 408 | +0.0% | 1.00x |
ObjectiveCBridgeToNSSet | 17670 | 17676 | +0.0% | 1.00x(?) |
PopFrontArrayGeneric | 1220 | 1217 | -0.2% | 1.00x(?) |
PopFrontUnsafePointer | 8522 | 8519 | -0.0% | 1.00x |
CaptureProp | 4593 | 4593 | +0.0% | 1.00x |
PolymorphicCalls | 86 | 86 | +0.0% | 1.00x |
MapReduce | 322 | 323 | +0.3% | 1.00x(?) |
OpenClose | 51 | 51 | +0.0% | 1.00x |
UTF8Decode | 255 | 254 | -0.4% | 1.00x |
SetIsSubsetOf | 463 | 463 | +0.0% | 1.00x |
NopDeinit | 33200 | 33195 | -0.0% | 1.00x(?) |
ObjectiveCBridgeFromNSArrayAnyObject | 62054 | 62267 | +0.3% | 1.00x(?) |
SetIntersect | 1051 | 1051 | +0.0% | 1.00x |
SetExclusiveOr | 3871 | 3883 | +0.3% | 1.00x(?) |
RGBHistogramOfObjects | 24642 | 24599 | -0.2% | 1.00x(?) |
StringBuilder | 1225 | 1230 | +0.4% | 1.00x |
Sim2DArray | 513 | 513 | +0.0% | 1.00x |
SetExclusiveOr_OfObjects | 13185 | 13171 | -0.1% | 1.00x(?) |
MonteCarloPi | 42680 | 42653 | -0.1% | 1.00x(?) |
MonteCarloE | 10042 | 10042 | +0.0% | 1.00x |
SetUnion_OfObjects | 10543 | 10524 | -0.2% | 1.00x(?) |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
Walsh | 309 | 309 | +0.0% | 1.00x |
SetIsSubsetOf_OfObjects | 601 | 601 | +0.0% | 1.00x |
ArrayAppend | 729 | 728 | -0.1% | 1.00x |
LinkedList | 8993 | 8992 | -0.0% | 1.00x(?) |
RGBHistogram | 3019 | 3018 | -0.0% | 1.00x(?) |
ObjectiveCBridgeFromNSSetAnyObjectForced | 3996 | 4012 | +0.4% | 1.00x(?) |
ArrayValueProp4 | 5 | 5 | +0.0% | 1.00x |
ArrayOfPOD | 171 | 171 | +0.0% | 1.00x |
SetUnion | 3550 | 3563 | +0.4% | 1.00x(?) |
Chars | 623 | 623 | +0.0% | 1.00x |
DeadArray | 174 | 174 | +0.0% | 1.00x |
BitCount | 15 | 15 | +0.0% | 1.00x |
AngryPhonebook | 0 | 0 | +0.0% | 1.00x |
ArrayValueProp3 | 5 | 5 | +0.0% | 1.00x |
StringWalk | 5599 | 5598 | -0.0% | 1.00x(?) |
ArrayValueProp | 5 | 5 | +0.0% | 1.00x |
RC4 | 242 | 241 | -0.4% | 1.00x |
Memset | 222 | 222 | +0.0% | 1.00x |
ArrayAppendReserved | 505 | 506 | +0.2% | 1.00x(?) |
TwoSum | 1617 | 1618 | +0.1% | 1.00x(?) |
ArrayValueProp2 | 5 | 5 | +0.0% | 1.00x |
ObjectiveCBridgeFromNSDictionaryAnyObject | 224351 | 226270 | +0.9% | 0.99x |
Histogram | 710 | 720 | +1.4% | 0.99x |
ObjectiveCBridgeFromNSArrayAnyObjectForced | 3600 | 3649 | +1.4% | 0.99x(?) |
ObjectiveCBridgeFromNSStringForced | 2125 | 2152 | +1.3% | 0.99x |
RangeAssignment | 278 | 280 | +0.7% | 0.99x |
StringInterpolation | 9101 | 9179 | +0.9% | 0.99x(?) |
NSError | 352 | 354 | +0.6% | 0.99x(?) |
DictionaryLiteral | 3211 | 3232 | +0.7% | 0.99x(?) |
Dictionary | 1813 | 1837 | +1.3% | 0.99x |
ArrayInClass | 81 | 82 | +1.2% | 0.99x(?) |
ArrayOfGenericRef | 3406 | 3431 | +0.7% | 0.99x(?) |
ObjectiveCBridgeFromNSString | 1526 | 1538 | +0.8% | 0.99x(?) |
Phonebook | 9850 | 9978 | +1.3% | 0.99x |
SevenBoom | 1270 | 1283 | +1.0% | 0.99x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 163012 | 165787 | +1.7% | 0.98x(?) |
ObjectAllocation | 141 | 144 | +2.1% | 0.98x(?) |
Dictionary3 | 1192 | 1213 | +1.8% | 0.98x |
ArrayOfRef | 3364 | 3417 | +1.6% | 0.98x |
Hanoi | 3115 | 3177 | +2.0% | 0.98x |
DictionaryRemoveOfObjects | 19311 | 19768 | +2.4% | 0.98x |
DictionaryRemove | 4614 | 4709 | +2.1% | 0.98x |
ObjectiveCBridgeFromNSSetAnyObjectToString | 178270 | 181178 | +1.6% | 0.98x(?) |
ObjectiveCBridgeStubFromArrayOfNSString | 109837 | 111981 | +1.9% | 0.98x(?) |
DictionarySwapOfObjects | 8479 | 8773 | +3.5% | 0.97x |
DictionaryBridge | 3666 | 3767 | +2.8% | 0.97x |
Dictionary2 | 3141 | 3238 | +3.1% | 0.97x |
DictionarySwap | 743 | 777 | +4.6% | 0.96x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 194998 | 205387 | +5.3% | 0.95x |
DictionaryOfObjects | 3939 | 4137 | +5.0% | 0.95x |
Regression (1)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 196895 | 209140 | +6.2% | 0.94x |
Improvement (1)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
CaptureProp | 52869 | 49944 | -5.5% | 1.06x |
No Changes (112)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
NSError | 653 | 636 | -2.6% | 1.03x(?) |
DictionaryLiteral | 21234 | 20691 | -2.6% | 1.03x |
ObjectiveCBridgeToNSDictionary | 18098 | 17543 | -3.1% | 1.03x(?) |
XorLoop | 19479 | 19119 | -1.9% | 1.02x |
Phonebook | 59144 | 58106 | -1.8% | 1.02x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToString | 193711 | 190715 | -1.6% | 1.02x(?) |
StackPromo | 80775 | 80263 | -0.6% | 1.01x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 159453 | 158367 | -0.7% | 1.01x(?) |
SortStrings | 5544 | 5515 | -0.5% | 1.01x |
PopFrontArray | 12382 | 12294 | -0.7% | 1.01x |
Dictionary3OfObjects | 3267 | 3246 | -0.6% | 1.01x(?) |
SuperChars | 727020 | 722709 | -0.6% | 1.01x |
ObjectAllocation | 1358 | 1339 | -1.4% | 1.01x |
TypeFlood | 150 | 149 | -0.7% | 1.01x(?) |
ObjectiveCBridgeFromNSSetAnyObject | 116741 | 115494 | -1.1% | 1.01x(?) |
OpenClose | 393 | 388 | -1.3% | 1.01x(?) |
DictionaryOfObjects | 8302 | 8226 | -0.9% | 1.01x(?) |
PopFrontArrayGeneric | 12456 | 12292 | -1.3% | 1.01x |
MapReduce | 43323 | 43100 | -0.5% | 1.01x(?) |
Hanoi | 23862 | 23736 | -0.5% | 1.01x(?) |
DictionaryRemoveOfObjects | 61035 | 60649 | -0.6% | 1.01x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 127563 | 125824 | -1.4% | 1.01x(?) |
NopDeinit | 59594 | 59255 | -0.6% | 1.01x |
NSDictionaryCastToSwift | 12187 | 12057 | -1.1% | 1.01x(?) |
SetIsSubsetOf_OfObjects | 2893 | 2875 | -0.6% | 1.01x(?) |
DeadArray | 106324 | 105574 | -0.7% | 1.01x(?) |
ObjectiveCBridgeStubFromArrayOfNSString | 110825 | 109626 | -1.1% | 1.01x(?) |
Dictionary2OfObjects | 7687 | 7619 | -0.9% | 1.01x(?) |
ArraySubscript | 4554 | 4546 | -0.2% | 1.00x(?) |
ObjectiveCBridgeToNSString | 1045 | 1045 | +0.0% | 1.00x |
DictionarySwapOfObjects | 25269 | 25286 | +0.1% | 1.00x(?) |
RecursiveOwnedParameter | 10375 | 10359 | -0.1% | 1.00x(?) |
Integrate | 339 | 339 | +0.0% | 1.00x |
ClassArrayGetter | 1266 | 1266 | +0.0% | 1.00x |
Histogram | 13879 | 13815 | -0.5% | 1.00x(?) |
MonteCarloPi | 50381 | 50354 | -0.1% | 1.00x(?) |
StringWithCString | 321800 | 321714 | -0.0% | 1.00x(?) |
Prims | 13945 | 13942 | -0.0% | 1.00x(?) |
SortLettersInPlace | 2314 | 2304 | -0.4% | 1.00x(?) |
DictionarySwap | 11118 | 11117 | -0.0% | 1.00x(?) |
ByteSwap | 8 | 8 | +0.0% | 1.00x |
StringInterpolation | 12036 | 11998 | -0.3% | 1.00x(?) |
ObjectiveCBridgeStubToNSString | 1695 | 1695 | +0.0% | 1.00x |
ProtocolDispatch | 5473 | 5472 | -0.0% | 1.00x(?) |
ArrayLiteral | 1033 | 1032 | -0.1% | 1.00x |
ProtocolDispatch2 | 413 | 414 | +0.2% | 1.00x(?) |
Walsh | 12301 | 12315 | +0.1% | 1.00x(?) |
Dictionary3 | 2631 | 2625 | -0.2% | 1.00x(?) |
StrComplexWalk | 7136 | 7119 | -0.2% | 1.00x(?) |
SetIntersect_OfObjects | 18962 | 19009 | +0.2% | 1.00x |
ObjectiveCBridgeToNSSet | 17804 | 17779 | -0.1% | 1.00x(?) |
PolymorphicCalls | 1122 | 1117 | -0.5% | 1.00x(?) |
Calculator | 932 | 933 | +0.1% | 1.00x(?) |
ArrayOfGenericPOD | 3361 | 3362 | +0.0% | 1.00x(?) |
UTF8Decode | 39390 | 39397 | +0.0% | 1.00x(?) |
SetIsSubsetOf | 2979 | 2980 | +0.0% | 1.00x(?) |
ObjectiveCBridgeFromNSArrayAnyObject | 66508 | 66614 | +0.2% | 1.00x(?) |
SetIntersect | 19102 | 19027 | -0.4% | 1.00x |
SetExclusiveOr | 49142 | 49275 | +0.3% | 1.00x |
RGBHistogramOfObjects | 98291 | 98070 | -0.2% | 1.00x(?) |
StringBuilder | 7942 | 7963 | +0.3% | 1.00x(?) |
ArrayInClass | 3665 | 3660 | -0.1% | 1.00x |
ArrayOfGenericRef | 10918 | 10937 | +0.2% | 1.00x(?) |
ObjectiveCBridgeFromNSString | 4873 | 4849 | -0.5% | 1.00x(?) |
Sim2DArray | 13453 | 13450 | -0.0% | 1.00x(?) |
SetExclusiveOr_OfObjects | 67553 | 67357 | -0.3% | 1.00x(?) |
MonteCarloE | 94994 | 95075 | +0.1% | 1.00x(?) |
SetUnion_OfObjects | 51548 | 51416 | -0.3% | 1.00x(?) |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
HashTest | 5682 | 5679 | -0.1% | 1.00x(?) |
ArrayAppend | 2835 | 2844 | +0.3% | 1.00x(?) |
DictionaryRemove | 30109 | 30118 | +0.0% | 1.00x(?) |
LinkedList | 26377 | 26309 | -0.3% | 1.00x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 116444 | 116880 | +0.4% | 1.00x(?) |
RGBHistogram | 49677 | 49494 | -0.4% | 1.00x |
ArrayAppendReserved | 2615 | 2607 | -0.3% | 1.00x(?) |
ArrayOfPOD | 2316 | 2317 | +0.0% | 1.00x(?) |
SetUnion | 35137 | 35151 | +0.0% | 1.00x(?) |
Chars | 54618 | 54640 | +0.0% | 1.00x(?) |
BitCount | 74 | 74 | +0.0% | 1.00x |
AngryPhonebook | 3513 | 3515 | +0.1% | 1.00x(?) |
SevenBoom | 1434 | 1437 | +0.2% | 1.00x |
ArrayValueProp | 2196 | 2202 | +0.3% | 1.00x(?) |
RC4 | 8781 | 8786 | +0.1% | 1.00x(?) |
Memset | 18841 | 18855 | +0.1% | 1.00x(?) |
ArrayValueProp4 | 2503 | 2508 | +0.2% | 1.00x(?) |
TwoSum | 9279 | 9279 | +0.0% | 1.00x |
ArrayValueProp2 | 18432 | 18500 | +0.4% | 1.00x(?) |
ArrayValueProp3 | 2551 | 2548 | -0.1% | 1.00x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObject | 225560 | 228205 | +1.2% | 0.99x(?) |
Array2D | 711639 | 717606 | +0.8% | 0.99x(?) |
RangeAssignment | 15648 | 15785 | +0.9% | 0.99x(?) |
113 | 5191514 | 5221520 | +0.6% | 0.99x |
ObjectiveCBridgeStubFromNSString | 1103 | 1115 | +1.1% | 0.99x |
StaticArray | 16616 | 16722 | +0.6% | 0.99x(?) |
Join | 1283 | 1292 | +0.7% | 0.99x(?) |
ArrayOfRef | 10201 | 10263 | +0.6% | 0.99x(?) |
ObjectiveCBridgeToNSArray | 28327 | 28637 | +1.1% | 0.99x(?) |
ObjectiveCBridgeStubToArrayOfNSString | 29486 | 29640 | +0.5% | 0.99x(?) |
ObjectiveCBridgeFromNSSetAnyObjectForced | 7400 | 7467 | +0.9% | 0.99x(?) |
StrToInt | 17444 | 17559 | +0.7% | 0.99x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectForced | 6849 | 6954 | +1.5% | 0.98x |
Dictionary2 | 5958 | 6058 | +1.7% | 0.98x(?) |
PopFrontUnsafePointer | 93610 | 95111 | +1.6% | 0.98x(?) |
Dictionary | 5144 | 5256 | +2.2% | 0.98x(?) |
StringWalk | 18215 | 18530 | +1.7% | 0.98x |
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 6956 | 7196 | +3.5% | 0.97x(?) |
ErrorHandling | 6857 | 7057 | +2.9% | 0.97x |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 158159 | 163254 | +3.2% | 0.97x(?) |
DictionaryBridge | 3743 | 3887 | +3.9% | 0.96x |
ObjectiveCBridgeFromNSStringForced | 2455 | 2568 | +4.6% | 0.96x |
NSStringConversion | 2596 | 2722 | +4.8% | 0.95x |
Can this get merged? |
Those performance regressions are a bit suspicious. Let's see if they are consistent. @swift-ci Please benchmark |
Build comment file:Optimized (O)
|
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
Calculator | 35 | 33 | -5.7% | 1.06x |
OpenClose | 52 | 49 | -5.8% | 1.06x |
StrToInt | 3916 | 3653 | -6.7% | 1.07x |
BitCount | 15 | 14 | -6.7% | 1.07x |
ClassArrayGetter | 13 | 12 | -7.7% | 1.08x |
Array2D | 2161 | 2010 | -7.0% | 1.08x |
DictionaryRemove | 5031 | 4625 | -8.1% | 1.09x |
No Changes (107)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ObjectiveCBridgeFromNSDictionaryAnyObject | 234907 | 223255 | -5.0% | 1.05x(?) |
DictionaryLiteral | 3315 | 3189 | -3.8% | 1.04x(?) |
ObjectiveCBridgeToNSDictionary | 17163 | 16518 | -3.8% | 1.04x |
ArrayAppend | 752 | 733 | -2.5% | 1.03x |
Phonebook | 11236 | 10925 | -2.8% | 1.03x |
Sim2DArray | 421 | 407 | -3.3% | 1.03x |
SortStrings | 1735 | 1702 | -1.9% | 1.02x |
ArrayLiteral | 1003 | 988 | -1.5% | 1.02x(?) |
ArrayOfRef | 3527 | 3451 | -2.1% | 1.02x(?) |
CaptureProp | 4735 | 4658 | -1.6% | 1.02x(?) |
ArraySubscript | 1372 | 1354 | -1.3% | 1.01x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 163908 | 161666 | -1.4% | 1.01x(?) |
Histogram | 717 | 713 | -0.6% | 1.01x |
DictionaryBridge | 3832 | 3808 | -0.6% | 1.01x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 4605 | 4572 | -0.7% | 1.01x(?) |
DictionarySwapOfObjects | 8483 | 8405 | -0.9% | 1.01x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectForced | 3693 | 3656 | -1.0% | 1.01x(?) |
Prims | 748 | 740 | -1.1% | 1.01x(?) |
DictionarySwap | 779 | 774 | -0.6% | 1.01x(?) |
Dictionary3OfObjects | 1199 | 1193 | -0.5% | 1.01x(?) |
ObjectiveCBridgeStubToNSString | 1389 | 1381 | -0.6% | 1.01x(?) |
ObjectiveCBridgeFromNSSetAnyObject | 116997 | 115580 | -1.2% | 1.01x(?) |
StrComplexWalk | 2583 | 2560 | -0.9% | 1.01x(?) |
ErrorHandling | 2737 | 2723 | -0.5% | 1.01x(?) |
ObjectiveCBridgeToNSArray | 29563 | 29323 | -0.8% | 1.01x(?) |
NSError | 358 | 356 | -0.6% | 1.01x(?) |
PopFrontArrayGeneric | 1250 | 1243 | -0.6% | 1.01x(?) |
PopFrontUnsafePointer | 8587 | 8505 | -0.9% | 1.01x |
DictionaryRemoveOfObjects | 19503 | 19290 | -1.1% | 1.01x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 130567 | 129578 | -0.8% | 1.01x(?) |
ObjectiveCBridgeFromNSArrayAnyObject | 63164 | 62607 | -0.9% | 1.01x(?) |
SetExclusiveOr | 3869 | 3826 | -1.1% | 1.01x(?) |
NSDictionaryCastToSwift | 11018 | 10878 | -1.3% | 1.01x(?) |
RGBHistogramOfObjects | 24991 | 24745 | -1.0% | 1.01x |
ArrayOfGenericRef | 3605 | 3566 | -1.1% | 1.01x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToString | 191872 | 190308 | -0.8% | 1.01x(?) |
SetUnion | 3548 | 3520 | -0.8% | 1.01x |
TwoSum | 1634 | 1617 | -1.0% | 1.01x |
MonteCarloPi | 42636 | 42651 | +0.0% | 1.00x(?) |
StackPromo | 18912 | 18982 | +0.4% | 1.00x |
PopFrontArray | 1248 | 1243 | -0.4% | 1.00x(?) |
RecursiveOwnedParameter | 1828 | 1828 | +0.0% | 1.00x |
Integrate | 235 | 234 | -0.4% | 1.00x(?) |
StringWithCString | 76684 | 76437 | -0.3% | 1.00x(?) |
SortLettersInPlace | 1027 | 1022 | -0.5% | 1.00x(?) |
RangeAssignment | 282 | 281 | -0.3% | 1.00x(?) |
ByteSwap | 0 | 0 | +0.0% | 1.00x |
SuperChars | 335984 | 337606 | +0.5% | 1.00x(?) |
XorLoop | 358 | 358 | +0.0% | 1.00x |
ProtocolDispatch | 2909 | 2912 | +0.1% | 1.00x(?) |
TypeFlood | 0 | 0 | +0.0% | 1.00x |
Walsh | 331 | 330 | -0.3% | 1.00x(?) |
Dictionary2 | 2153 | 2158 | +0.2% | 1.00x(?) |
SetIntersect_OfObjects | 3262 | 3263 | +0.0% | 1.00x(?) |
DictionaryOfObjects | 2849 | 2855 | +0.2% | 1.00x(?) |
PolymorphicCalls | 62 | 62 | +0.0% | 1.00x |
Hanoi | 3308 | 3320 | +0.4% | 1.00x(?) |
ArrayOfGenericPOD | 208 | 208 | +0.0% | 1.00x |
UTF8Decode | 261 | 261 | +0.0% | 1.00x |
SetIsSubsetOf | 463 | 463 | +0.0% | 1.00x |
NopDeinit | 34938 | 34963 | +0.1% | 1.00x(?) |
ObjectiveCBridgeStubToArrayOfNSString | 29545 | 29457 | -0.3% | 1.00x(?) |
SetIntersect | 1046 | 1046 | +0.0% | 1.00x |
StringBuilder | 1239 | 1240 | +0.1% | 1.00x(?) |
MonteCarloE | 10067 | 10069 | +0.0% | 1.00x(?) |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
HashTest | 1604 | 1611 | +0.4% | 1.00x(?) |
SetIsSubsetOf_OfObjects | 601 | 601 | +0.0% | 1.00x |
RGBHistogram | 3069 | 3081 | +0.4% | 1.00x(?) |
ArrayAppendReserved | 514 | 513 | -0.2% | 1.00x(?) |
ArrayOfPOD | 171 | 171 | +0.0% | 1.00x |
Chars | 687 | 685 | -0.3% | 1.00x(?) |
DeadArray | 174 | 174 | +0.0% | 1.00x |
AngryPhonebook | 0 | 0 | +0.0% | 1.00x |
SevenBoom | 1297 | 1300 | +0.2% | 1.00x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 162576 | 162551 | -0.0% | 1.00x(?) |
StringWalk | 5624 | 5629 | +0.1% | 1.00x(?) |
ArrayValueProp | 5 | 5 | +0.0% | 1.00x |
RC4 | 242 | 242 | +0.0% | 1.00x |
Memset | 222 | 222 | +0.0% | 1.00x |
ArrayValueProp4 | 5 | 5 | +0.0% | 1.00x |
ArrayValueProp2 | 5 | 5 | +0.0% | 1.00x |
ArrayValueProp3 | 5 | 5 | +0.0% | 1.00x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 202998 | 204133 | +0.6% | 0.99x(?) |
ObjectiveCBridgeFromNSStringForced | 2207 | 2221 | +0.6% | 0.99x(?) |
StringInterpolation | 9306 | 9444 | +1.5% | 0.99x(?) |
113 | 2420728 | 2436752 | +0.7% | 0.99x |
Join | 408 | 411 | +0.7% | 0.99x(?) |
ObjectiveCBridgeStubFromNSString | 732 | 743 | +1.5% | 0.99x |
ProtocolDispatch2 | 156 | 157 | +0.6% | 0.99x(?) |
Dictionary3 | 746 | 750 | +0.5% | 0.99x(?) |
MapReduce | 332 | 336 | +1.2% | 0.99x(?) |
Dictionary | 947 | 956 | +0.9% | 0.99x |
ArrayInClass | 82 | 83 | +1.2% | 0.99x(?) |
SetExclusiveOr_OfObjects | 13279 | 13383 | +0.8% | 0.99x(?) |
SetUnion_OfObjects | 10643 | 10699 | +0.5% | 0.99x(?) |
LinkedList | 8969 | 9021 | +0.6% | 0.99x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 116222 | 117157 | +0.8% | 0.99x(?) |
ObjectiveCBridgeStubFromArrayOfNSString | 111131 | 111691 | +0.5% | 0.99x(?) |
Dictionary2OfObjects | 3886 | 3928 | +1.1% | 0.99x(?) |
ObjectiveCBridgeToNSString | 1034 | 1055 | +2.0% | 0.98x |
StaticArray | 2716 | 2771 | +2.0% | 0.98x(?) |
ObjectAllocation | 144 | 147 | +2.1% | 0.98x(?) |
ObjectiveCBridgeToNSSet | 16050 | 16386 | +2.1% | 0.98x(?) |
ObjectiveCBridgeFromNSString | 1577 | 1618 | +2.6% | 0.97x(?) |
NSStringConversion | 579 | 594 | +2.6% | 0.97x(?) |
ObjectiveCBridgeFromNSSetAnyObjectForced | 4058 | 4231 | +4.3% | 0.96x(?) |
Regression (1)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
StringWalk | 38252 | 47843 | +25.1% | 0.80x(?) |
Improvement (0)
No Changes (113)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
Phonebook | 61616 | 58610 | -4.9% | 1.05x(?) |
ObjectiveCBridgeToNSDictionary | 16593 | 15815 | -4.7% | 1.05x(?) |
ArrayOfPOD | 2353 | 2233 | -5.1% | 1.05x |
ArrayOfGenericPOD | 3466 | 3334 | -3.8% | 1.04x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 171662 | 165106 | -3.8% | 1.04x |
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 7334 | 7125 | -2.9% | 1.03x(?) |
ObjectiveCBridgeToNSArray | 29849 | 29096 | -2.5% | 1.03x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 139991 | 135729 | -3.0% | 1.03x(?) |
RangeAssignment | 16238 | 15849 | -2.4% | 1.02x(?) |
XorLoop | 20067 | 19721 | -1.7% | 1.02x |
TypeFlood | 149 | 146 | -2.0% | 1.02x(?) |
Dictionary3 | 2141 | 2102 | -1.8% | 1.02x |
OpenClose | 424 | 417 | -1.6% | 1.02x(?) |
ArrayAppendReserved | 2738 | 2682 | -2.0% | 1.02x |
ObjectiveCBridgeStubFromArrayOfNSString | 111565 | 109031 | -2.3% | 1.02x(?) |
StaticArray | 17535 | 17436 | -0.6% | 1.01x(?) |
AngryPhonebook | 3545 | 3518 | -0.8% | 1.01x |
ArrayAppend | 2924 | 2905 | -0.7% | 1.01x(?) |
DictionaryLiteral | 20593 | 20313 | -1.4% | 1.01x(?) |
Hanoi | 23411 | 23251 | -0.7% | 1.01x(?) |
ObjectiveCBridgeStubToArrayOfNSString | 30247 | 29930 | -1.1% | 1.01x(?) |
ObjectiveCBridgeFromNSArrayAnyObject | 68378 | 67846 | -0.8% | 1.01x |
StrToInt | 17657 | 17457 | -1.1% | 1.01x |
ObjectiveCBridgeFromNSSetAnyObjectForced | 7632 | 7564 | -0.9% | 1.01x(?) |
StringBuilder | 8084 | 7970 | -1.4% | 1.01x(?) |
DeadArray | 108263 | 107714 | -0.5% | 1.01x(?) |
Dictionary2OfObjects | 6755 | 6693 | -0.9% | 1.01x(?) |
ArraySubscript | 4525 | 4510 | -0.3% | 1.00x |
PopFrontArray | 12466 | 12523 | +0.5% | 1.00x(?) |
ObjectiveCBridgeStubToNSString | 1725 | 1730 | +0.3% | 1.00x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 162813 | 162925 | +0.1% | 1.00x(?) |
ClassArrayGetter | 1266 | 1266 | +0.0% | 1.00x |
Array2D | 706879 | 706707 | -0.0% | 1.00x(?) |
SortStrings | 5636 | 5658 | +0.4% | 1.00x(?) |
DictionaryBridge | 3907 | 3910 | +0.1% | 1.00x(?) |
MonteCarloPi | 50397 | 50405 | +0.0% | 1.00x(?) |
StringWithCString | 321809 | 321518 | -0.1% | 1.00x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectForced | 7100 | 7085 | -0.2% | 1.00x(?) |
ByteSwap | 9 | 9 | +0.0% | 1.00x |
SuperChars | 609151 | 611836 | +0.4% | 1.00x(?) |
113 | 5222326 | 5198002 | -0.5% | 1.00x |
ProtocolDispatch | 4859 | 4842 | -0.3% | 1.00x(?) |
ProtocolDispatch2 | 426 | 428 | +0.5% | 1.00x(?) |
Walsh | 12348 | 12355 | +0.1% | 1.00x(?) |
Dictionary2 | 4951 | 4950 | -0.0% | 1.00x(?) |
SetIntersect_OfObjects | 18770 | 18747 | -0.1% | 1.00x(?) |
ErrorHandling | 6930 | 6896 | -0.5% | 1.00x(?) |
ArrayOfRef | 10183 | 10186 | +0.0% | 1.00x(?) |
NSError | 659 | 658 | -0.1% | 1.00x(?) |
PopFrontArrayGeneric | 12601 | 12588 | -0.1% | 1.00x(?) |
Calculator | 923 | 921 | -0.2% | 1.00x(?) |
MapReduce | 43587 | 43565 | -0.1% | 1.00x(?) |
UTF8Decode | 39482 | 39437 | -0.1% | 1.00x(?) |
NSDictionaryCastToSwift | 12207 | 12160 | -0.4% | 1.00x(?) |
ArrayInClass | 3661 | 3661 | +0.0% | 1.00x |
ArrayOfGenericRef | 10728 | 10738 | +0.1% | 1.00x(?) |
Sim2DArray | 13487 | 13530 | +0.3% | 1.00x(?) |
SetExclusiveOr_OfObjects | 66696 | 66915 | +0.3% | 1.00x |
MonteCarloE | 95225 | 95487 | +0.3% | 1.00x(?) |
SetUnion_OfObjects | 51123 | 51292 | +0.3% | 1.00x |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
HashTest | 5696 | 5701 | +0.1% | 1.00x(?) |
SetIsSubsetOf_OfObjects | 2834 | 2845 | +0.4% | 1.00x(?) |
ObjectiveCBridgeToNSSet | 16533 | 16525 | -0.1% | 1.00x(?) |
DictionaryRemove | 30111 | 30149 | +0.1% | 1.00x(?) |
LinkedList | 26362 | 26294 | -0.3% | 1.00x(?) |
NSStringConversion | 2596 | 2607 | +0.4% | 1.00x(?) |
RGBHistogram | 49338 | 49578 | +0.5% | 1.00x(?) |
SetUnion | 34724 | 34746 | +0.1% | 1.00x(?) |
Chars | 54795 | 54790 | -0.0% | 1.00x(?) |
BitCount | 79 | 79 | +0.0% | 1.00x |
ArrayLiteral | 1053 | 1053 | +0.0% | 1.00x |
SevenBoom | 1449 | 1448 | -0.1% | 1.00x(?) |
ArrayValueProp | 2264 | 2254 | -0.4% | 1.00x(?) |
RC4 | 8778 | 8801 | +0.3% | 1.00x(?) |
Memset | 18814 | 18819 | +0.0% | 1.00x(?) |
ArrayValueProp4 | 2560 | 2556 | -0.2% | 1.00x(?) |
ArrayValueProp2 | 18491 | 18433 | -0.3% | 1.00x |
ArrayValueProp3 | 2604 | 2596 | -0.3% | 1.00x(?) |
ObjectiveCBridgeToNSString | 1078 | 1091 | +1.2% | 0.99x(?) |
DictionarySwapOfObjects | 25108 | 25328 | +0.9% | 0.99x(?) |
RecursiveOwnedParameter | 10341 | 10397 | +0.5% | 0.99x(?) |
Histogram | 13679 | 13823 | +1.1% | 0.99x(?) |
ObjectiveCBridgeFromNSStringForced | 2617 | 2641 | +0.9% | 0.99x(?) |
Prims | 13747 | 13859 | +0.8% | 0.99x |
SortLettersInPlace | 2337 | 2350 | +0.6% | 0.99x(?) |
DictionarySwap | 11165 | 11299 | +1.2% | 0.99x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObject | 231489 | 232746 | +0.5% | 0.99x(?) |
StringInterpolation | 12207 | 12362 | +1.3% | 0.99x(?) |
Integrate | 351 | 354 | +0.8% | 0.99x(?) |
Join | 1305 | 1314 | +0.7% | 0.99x |
ObjectiveCBridgeStubFromNSString | 1135 | 1144 | +0.8% | 0.99x(?) |
ObjectAllocation | 1316 | 1325 | +0.7% | 0.99x(?) |
DictionaryOfObjects | 7092 | 7167 | +1.1% | 0.99x |
PopFrontUnsafePointer | 96105 | 97210 | +1.1% | 0.99x(?) |
PolymorphicCalls | 1176 | 1187 | +0.9% | 0.99x(?) |
DictionaryRemoveOfObjects | 60548 | 61312 | +1.3% | 0.99x |
SetIsSubsetOf | 2949 | 2971 | +0.8% | 0.99x |
Dictionary | 4236 | 4275 | +0.9% | 0.99x(?) |
SetIntersect | 18825 | 19000 | +0.9% | 0.99x(?) |
SetExclusiveOr | 48495 | 48782 | +0.6% | 0.99x |
TwoSum | 9162 | 9264 | +1.1% | 0.99x(?) |
StackPromo | 80996 | 82304 | +1.6% | 0.98x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 215193 | 218858 | +1.7% | 0.98x |
Dictionary3OfObjects | 2716 | 2764 | +1.8% | 0.98x(?) |
ObjectiveCBridgeFromNSSetAnyObject | 117793 | 120540 | +2.3% | 0.98x(?) |
NopDeinit | 58943 | 60261 | +2.2% | 0.98x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToString | 204559 | 209320 | +2.3% | 0.98x(?) |
RGBHistogramOfObjects | 97588 | 99240 | +1.7% | 0.98x(?) |
StrComplexWalk | 7139 | 7325 | +2.6% | 0.97x |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 124993 | 128881 | +3.1% | 0.97x |
CaptureProp | 52316 | 54497 | +4.2% | 0.96x |
ObjectiveCBridgeFromNSString | 4988 | 5172 | +3.7% | 0.96x(?) |
Good, looks like those regressions were noise. @gribozavr, anything else? |
using namespace swift; | ||
|
||
#define reportError(PThreadFunction) \ | ||
{ \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usual way to define multi-statement macros is to use do { ... } while false
, and allow the semicolon from the call site to end the statement.
No objections from me. |
@swift-ci Please test and merge |
@gribozavr the failure looks unrelated, at least I don't think the runtime would be involved at this point in time, etc. |
@shawnce I agree. Merged! |
@shawnce Our Linux CI bots are timing out on your mutex test:
|
We'll need a fix for the test hang before taking any new changes. Do you suspect a bug in the test or a bug in the mutex implementation? |
@gparker42 I strongly believe it is the test itself, it has a potential to successfully grab the lock in the try_lock step despite the test assuming it can't (it should assert a test failure if it does but it likely is hung preventing that), it then can leave things locked which would block later steps in the test. I don't have the exact line number from the bt above but I believe that is what is happening. |
@gparker42 I could attempt to submit my reworked tests from the other PR omitting the ones related to newly added read / write lock, etc. |
I fixed a deadlock in LockableThreaded in fa77a7a. |
What's in this pull request?
The changes in this pull request addresses SR-946 by adding swift::Mutex, swift:Condition, swift::ScopedLock, and swift::ScopedUnlock to the swift runtime. Existing swift runtime code was converted over to use these new classes and off of pthread_mutex directly and/or std::mutex.
Note two locations in the runtime continue to use pthread_mutex and pthread_rwlock (comments added to affected source code). Those will be corrected in a later pull request / SR as needed.
My original branch got in a bad state after running update-checkout that prevented me from pushing (or force pushing). I had to remove the old branch and recreate by cherry picking my work. The original PR related to these changes was #1700. Sorry about that!
Resolved bug number: (SR-946)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
Validation Testing
Note: Only members of the Apple organization can trigger swift-ci.