Skip to content

Don't merge [benchmark] Compile and run benchmark on Linux #7810

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

Closed
wants to merge 281 commits into from

Conversation

mtake
Copy link
Contributor

@mtake mtake commented Feb 28, 2017

(This PR has been superseded by #7928)

Exclude Objective-C or Mach specific implementations, or replace them with POSIX based implementations so that we can compile and run benchmark on Linux.

@mtake
Copy link
Contributor Author

mtake commented Feb 28, 2017

Contributed my patch to the community.

@bitjammer @lplarson Please review

@airspeedswift
Copy link
Member

@swift-ci Please benchmark

Copy link
Member

@airspeedswift airspeedswift left a comment

Choose a reason for hiding this comment

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

Thanks for taking this on @mtake!

@gottesmm you might want to take a look at these.

@@ -133,7 +133,7 @@ public func run_MapReduceShortString(_ N: Int) {

@inline(never)
public func run_MapReduceClass(_ N: Int) {
let numbers = (0..<1000).map { NSDecimalNumber(value: $0) }
let numbers = (0..<1000).map { NSDecimalNumber(integerLiteral: $0) }
Copy link
Member

@airspeedswift airspeedswift Feb 28, 2017

Choose a reason for hiding this comment

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

I think it's preferred not to call the ExpressibleBy... methods directly. Maybe it makes sense to replace this use of NSDecimalNumber with something else, given we now have DecimalNumber.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@airspeedswift NSDecimalNumber(integerLiteral: $0) can be replaced with Decimal($0) if we have a way to convert Decimal to Int. I don't think Int(NSDecimalNumber(decimal: $0)) makes sense. Any suggestions?

Copy link
Contributor Author

@mtake mtake Mar 3, 2017

Choose a reason for hiding this comment

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

Fixed in 20801a0.
I reverted to the original code and excluded it unless objc runtime is available, as I did for other tests.

@@ -20,6 +20,7 @@ import TestsUtils

@inline(never)
public func run_NSDictionaryCastToSwift(_ N: Int) {
#if _runtime(_ObjC)
Copy link
Member

@airspeedswift airspeedswift Feb 28, 2017

Choose a reason for hiding this comment

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

It is probably better if practical to just #if out the entire functions if possible, and then just not call them on Linux, rather than call them with empty bodies.

Copy link
Contributor Author

@mtake mtake Mar 1, 2017

Choose a reason for hiding this comment

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

@airspeedswift As described in the comment, utils/main.swift is generated from templates. My goal is to selectively skip compiling and running each test solely by itself while keeping templates and the generation utility unchanged. I think this is important to avoid any impact to the existing build and test framework.

Copy link
Contributor

Choose a reason for hiding this comment

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

In a future pull request, we should update the generation utility to support #if defining out entire benchmark functions.

@@ -19,6 +19,7 @@ public func run_StringWithCString(_ N: Int) {
}

public func run_StringHasPrefix(_ N: Int) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a // FIXME(string) for these ones? This particular function ought to get added for Linux as part of the String rework, so hopefully we can restore this test on Linux then (unlike some of the objc runtime tests which may only ever run on Darwin).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@airspeedswift Fixed in 7980623. Thanks.

Joe Shajrawi and others added 2 commits February 28, 2017 10:52
…aints

[GenericSignatureBuilder] Remove self-derived same-type-to-concrete constraints.
@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (3)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
OpenClose 51 60 +17.6% 0.85x
NopDeinit 21367 22893 +7.1% 0.93x
ObjectiveCBridgeStubFromNSDate 3761 4036 +7.3% 0.93x
Improvement (5)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeStubNSDateRefAccess 345 318 -7.8% 1.08x
StringHasSuffix 828 731 -11.7% 1.13x
ObjectiveCBridgeStubFromNSStringRef 200 173 -13.5% 1.16x
StringHasPrefix 774 667 -13.8% 1.16x
ObjectiveCBridgeStubToNSStringRef 129 110 -14.7% 1.17x
No Changes (164)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeStubFromNSString 944 909 -3.7% 1.04x
Hanoi 3617 3482 -3.7% 1.04x
ErrorHandling 3150 3046 -3.3% 1.03x(?)
StrToInt 6490 6323 -2.6% 1.03x
Walsh 355 348 -2.0% 1.02x(?)
NSDictionaryCastToSwift 5418 5291 -2.3% 1.02x(?)
Phonebook 7705 7583 -1.6% 1.02x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 143866 142057 -1.3% 1.01x(?)
DictionaryBridge 2989 2966 -0.8% 1.01x(?)
ArrayAppendLatin1 45161 44809 -0.8% 1.01x
ObjectiveCBridgeStubToNSString 1521 1506 -1.0% 1.01x(?)
ObjectiveCBridgeStubURLAppendPathRef 215472 212385 -1.4% 1.01x(?)
ObjectiveCBridgeToNSArray 28477 28228 -0.9% 1.01x(?)
ObjectiveCBridgeStubToNSDateRef 3395 3373 -0.7% 1.01x(?)
ArrayAppendUTF16 41738 41458 -0.7% 1.01x(?)
SetExclusiveOr 2522 2498 -0.9% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 96653 96033 -0.6% 1.01x(?)
ArrayAppendOptionals 1233 1217 -1.3% 1.01x(?)
SetExclusiveOr_OfObjects 7983 7888 -1.2% 1.01x(?)
MonteCarloE 10637 10532 -1.0% 1.01x
SetUnion_OfObjects 6428 6367 -0.9% 1.01x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 71691 71305 -0.5% 1.01x(?)
HashTest 1801 1791 -0.6% 1.01x(?)
StringHasPrefixUnicode 14183 14086 -0.7% 1.01x(?)
RGBHistogram 2623 2608 -0.6% 1.01x(?)
StringWalk 5864 5834 -0.5% 1.01x
ArraySubscript 1553 1558 +0.3% 1.00x(?)
ObjectiveCBridgeToNSString 1261 1260 -0.1% 1.00x(?)
DictionarySwapOfObjects 6945 6946 +0.0% 1.00x(?)
RecursiveOwnedParameter 2360 2356 -0.2% 1.00x(?)
Integrate 262 262 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObjectToString 43346 43434 +0.2% 1.00x(?)
ClassArrayGetter 13 13 +0.0% 1.00x
Array2D 1946 1941 -0.3% 1.00x(?)
Histogram 268 268 +0.0% 1.00x
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 4972 4968 -0.1% 1.00x(?)
MonteCarloPi 45058 44871 -0.4% 1.00x
StringWithCString 155709 155849 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 4443 4459 +0.4% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2310 2306 -0.2% 1.00x(?)
SortLettersInPlace 1150 1150 +0.0% 1.00x
DictionarySwap 373 372 -0.3% 1.00x
ReversedDictionary 133 133 +0.0% 1.00x
ArrayAppendToFromGeneric 598 598 +0.0% 1.00x
ObjectiveCBridgeFromNSDictionaryAnyObject 117574 117615 +0.0% 1.00x(?)
Dictionary3OfObjects 1010 1011 +0.1% 1.00x(?)
MapReduceLazyCollectionShort 60 60 +0.0% 1.00x
ByteSwap 0 0 +0.0% 1.00x
ArrayAppendGenericStructs 1227 1222 -0.4% 1.00x(?)
SuperChars 220732 220723 -0.0% 1.00x(?)
ArrayAppendLazyMap 913 912 -0.1% 1.00x(?)
ArrayPlusEqualFiveElementCollection 59724 59874 +0.2% 1.00x(?)
XorLoop 353 353 +0.0% 1.00x
ArrayAppendReserved 739 739 +0.0% 1.00x
ObserverClosure 2229 2224 -0.2% 1.00x(?)
AnyHashableWithAClass 67050 67117 +0.1% 1.00x(?)
CharacterLiteralsSmall 804 804 +0.0% 1.00x
ArrayPlusEqualSingleElementCollection 57446 57407 -0.1% 1.00x(?)
ArrayAppendStrings 13491 13488 -0.0% 1.00x(?)
StaticArray 145 145 +0.0% 1.00x
ProtocolDispatch 3030 3030 +0.0% 1.00x
TypeFlood 0 0 +0.0% 1.00x
ObjectiveCBridgeFromNSSetAnyObject 64345 64379 +0.1% 1.00x(?)
ArrayLiteral 1411 1411 +0.0% 1.00x
CharacterLiteralsLarge 12287 12264 -0.2% 1.00x(?)
Dictionary3 593 592 -0.2% 1.00x(?)
Dictionary2 2158 2162 +0.2% 1.00x(?)
SetIntersect_OfObjects 1720 1720 +0.0% 1.00x
Join 486 488 +0.4% 1.00x(?)
ArrayOfRef 3880 3881 +0.0% 1.00x(?)
ObserverUnappliedMethod 2690 2691 +0.0% 1.00x(?)
ObjectiveCBridgeToNSSet 36252 36339 +0.2% 1.00x(?)
ObjectiveCBridgeStubDateMutation 272 272 +0.0% 1.00x
NSError 346 346 +0.0% 1.00x
DictionaryOfObjects 2571 2572 +0.0% 1.00x(?)
PopFrontArrayGeneric 1193 1192 -0.1% 1.00x(?)
StringEqualPointerComparison 7313 7345 +0.4% 1.00x
CaptureProp 809 809 +0.0% 1.00x
PolymorphicCalls 22 22 +0.0% 1.00x
RC4 157 157 +0.0% 1.00x
Calculator 35 35 +0.0% 1.00x
ArrayAppendFromGeneric 598 597 -0.2% 1.00x(?)
MapReduce 371 371 +0.0% 1.00x
MapReduceSequence 614 614 +0.0% 1.00x
IterateData 2684 2684 +0.0% 1.00x
DictionaryLiteral 1468 1469 +0.1% 1.00x(?)
ArrayOfGenericPOD 219 219 +0.0% 1.00x
DictionaryRemoveOfObjects 22504 22443 -0.3% 1.00x(?)
ObjectiveCBridgeStubURLAppendPath 214272 213420 -0.4% 1.00x(?)
SortStringsUnicode 7612 7617 +0.1% 1.00x(?)
MapReduceLazySequence 47 47 +0.0% 1.00x
SetIsSubsetOf 292 292 +0.0% 1.00x
Dictionary 805 805 +0.0% 1.00x
ObjectiveCBridgeStubToArrayOfNSString 27738 27623 -0.4% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 23493 23592 +0.4% 1.00x(?)
MapReduceClassShort 4837 4837 +0.0% 1.00x
ObjectiveCBridgeFromNSSetAnyObjectToString 80893 80614 -0.3% 1.00x(?)
StringBuilder 1362 1363 +0.1% 1.00x(?)
ArrayInClass 61 61 +0.0% 1.00x
ArrayOfGenericRef 4001 3997 -0.1% 1.00x(?)
ObjectiveCBridgeFromNSString 1398 1398 +0.0% 1.00x
ObjectiveCBridgeStubDateAccess 181 181 +0.0% 1.00x
Sim2DArray 276 276 +0.0% 1.00x
ArrayAppendRepeatCol 839 839 +0.0% 1.00x
MapReduceShortString 20 20 +0.0% 1.00x
StringHasSuffixUnicode 61165 61038 -0.2% 1.00x(?)
ArrayAppendToGeneric 598 598 +0.0% 1.00x
SetIsSubsetOf_OfObjects 362 362 +0.0% 1.00x
ArrayAppend 986 985 -0.1% 1.00x(?)
DictionaryRemove 3116 3108 -0.3% 1.00x(?)
LinkedList 7127 7132 +0.1% 1.00x(?)
MapReduceAnyCollection 374 374 +0.0% 1.00x
ReversedBidirectional 49855 49823 -0.1% 1.00x(?)
RGBHistogramOfObjects 23960 23932 -0.1% 1.00x(?)
NSStringConversion 755 757 +0.3% 1.00x(?)
MapReduceLazyCollection 89 89 +0.0% 1.00x
ObjectiveCBridgeFromNSSetAnyObjectForced 4141 4154 +0.3% 1.00x(?)
ArrayAppendSequence 981 980 -0.1% 1.00x(?)
ArrayAppendArrayOfInt 598 598 +0.0% 1.00x
ArrayOfPOD 166 166 +0.0% 1.00x
Chars 1464 1468 +0.3% 1.00x
ReversedArray 49 49 +0.0% 1.00x
ObserverForwarderStruct 1107 1105 -0.2% 1.00x(?)
DeadArray 181 181 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2284 2275 -0.4% 1.00x(?)
BitCount 1 1 +0.0% 1.00x
AngryPhonebook 2934 2930 -0.1% 1.00x(?)
ArrayPlusEqualArrayOfInt 598 598 +0.0% 1.00x
SevenBoom 1465 1469 +0.3% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 71494 71487 -0.0% 1.00x(?)
ArrayValueProp 6 6 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 52631 52727 +0.2% 1.00x(?)
MapReduceClass 3148 3144 -0.1% 1.00x(?)
GlobalClass 0 0 +0.0% 1.00x
Memset 234 234 +0.0% 1.00x
ArrayValueProp4 6 6 +0.0% 1.00x
TwoSum 1257 1256 -0.1% 1.00x(?)
ArrayValueProp2 6 6 +0.0% 1.00x
ArrayValueProp3 6 6 +0.0% 1.00x
ObserverPartiallyAppliedMethod 3754 3751 -0.1% 1.00x(?)
StackPromo 24342 24547 +0.8% 0.99x(?)
PopFrontArray 1193 1199 +0.5% 0.99x(?)
SortStrings 1715 1729 +0.8% 0.99x
Prims 788 795 +0.9% 0.99x(?)
ArrayAppendASCII 19924 20030 +0.5% 0.99x(?)
StringInterpolation 9283 9332 +0.5% 0.99x(?)
ObjectAllocation 180 181 +0.6% 0.99x(?)
SortSortedStrings 871 882 +1.3% 0.99x
StrComplexWalk 2938 2955 +0.6% 0.99x(?)
PopFrontUnsafePointer 9078 9173 +1.1% 0.99x(?)
MapReduceShort 2145 2163 +0.8% 0.99x(?)
UTF8Decode 282 285 +1.1% 0.99x
ObjectiveCBridgeToNSDictionary 59655 60294 +1.1% 0.99x(?)
SetUnion 2084 2101 +0.8% 0.99x(?)
Dictionary2OfObjects 3657 3682 +0.7% 0.99x(?)
ProtocolDispatch2 157 160 +1.9% 0.98x
171 2734421 2778298 +1.6% 0.98x
SetIntersect 321 327 +1.9% 0.98x
ObjectiveCBridgeStubDataAppend 3620 3695 +2.1% 0.98x(?)
RangeAssignment 317 327 +3.1% 0.97x(?)
ObjectiveCBridgeStubToNSDate 14375 14769 +2.7% 0.97x(?)
ObjectiveCBridgeStubNSDateMutationRef 12139 12513 +3.1% 0.97x(?)
MapReduceString 78 81 +3.9% 0.96x
ObjectiveCBridgeStubFromNSDateRef 3759 3975 +5.8% 0.95x
**Unoptimized (Onone)**
Regression (1)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ArrayAppendReserved 3300 3525 +6.8% 0.94x
Improvement (0)
No Changes (171)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeStubNSDateMutationRef 15818 15011 -5.1% 1.05x(?)
PopFrontArrayGeneric 8340 8129 -2.5% 1.03x(?)
ObjectiveCBridgeToNSSet 36905 36152 -2.0% 1.02x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 87500 85447 -2.4% 1.02x(?)
ObjectiveCBridgeStubFromNSDateRef 4153 4089 -1.5% 1.02x
DictionaryBridge 3079 3034 -1.5% 1.01x(?)
DictionarySwap 5445 5415 -0.6% 1.01x
Dictionary3 1376 1363 -0.9% 1.01x(?)
TypeFlood 167 166 -0.6% 1.01x(?)
ObjectiveCBridgeFromNSSetAnyObject 67919 67573 -0.5% 1.01x(?)
DictionarySwapOfObjects 19737 19610 -0.6% 1.01x(?)
ObjectiveCBridgeStubURLAppendPathRef 218443 216707 -0.8% 1.01x(?)
CaptureProp 100275 99648 -0.6% 1.01x
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 99840 98870 -1.0% 1.01x(?)
NSDictionaryCastToSwift 6492 6406 -1.3% 1.01x(?)
RGBHistogram 32019 31859 -0.5% 1.01x(?)
BitCount 98 97 -1.0% 1.01x
ObjectiveCBridgeStubFromArrayOfNSString 53236 52824 -0.8% 1.01x(?)
Memset 44994 44554 -1.0% 1.01x(?)
ObjectiveCBridgeStubFromNSDate 3899 3856 -1.1% 1.01x(?)
ArraySubscript 4253 4254 +0.0% 1.00x(?)
ObjectiveCBridgeToNSString 1307 1307 +0.0% 1.00x
MonteCarloPi 53395 53168 -0.4% 1.00x
StackPromo 99361 98885 -0.5% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 120677 120577 -0.1% 1.00x(?)
RecursiveOwnedParameter 9413 9410 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 146351 146486 +0.1% 1.00x(?)
ClassArrayGetter 927 927 +0.0% 1.00x
Array2D 606551 606349 -0.0% 1.00x(?)
Histogram 8560 8541 -0.2% 1.00x(?)
SortStrings 2689 2688 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 7512 7501 -0.1% 1.00x(?)
ProtocolDispatch2 420 420 +0.0% 1.00x
ReversedArray 522 522 +0.0% 1.00x
ArrayOfGenericPOD 3094 3093 -0.0% 1.00x(?)
StringWithCString 343388 343371 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 7626 7625 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2697 2697 +0.0% 1.00x
Prims 8907 8912 +0.1% 1.00x(?)
SortLettersInPlace 2730 2718 -0.4% 1.00x(?)
ReversedDictionary 24600 24604 +0.0% 1.00x(?)
ArrayAppendToFromGeneric 656 656 +0.0% 1.00x
MapReduceString 2248 2247 -0.0% 1.00x(?)
PopFrontArray 10967 10969 +0.0% 1.00x(?)
ArrayAppendASCII 82268 82045 -0.3% 1.00x
Dictionary3OfObjects 2181 2180 -0.1% 1.00x(?)
RangeAssignment 5590 5595 +0.1% 1.00x(?)
MapReduceLazyCollectionShort 42816 42801 -0.0% 1.00x(?)
StringHasPrefix 1671 1668 -0.2% 1.00x(?)
ByteSwap 10 10 +0.0% 1.00x
ArrayAppendGenericStructs 1286 1287 +0.1% 1.00x(?)
SuperChars 270969 271526 +0.2% 1.00x(?)
ArrayAppendLazyMap 224738 224852 +0.1% 1.00x(?)
ArrayPlusEqualFiveElementCollection 277058 277269 +0.1% 1.00x(?)
XorLoop 22527 22525 -0.0% 1.00x(?)
StringInterpolation 14987 14993 +0.0% 1.00x(?)
ObserverClosure 6629 6631 +0.0% 1.00x(?)
AnyHashableWithAClass 83493 83515 +0.0% 1.00x(?)
CharacterLiteralsSmall 1250 1247 -0.2% 1.00x
Integrate 399 398 -0.2% 1.00x(?)
ArrayPlusEqualSingleElementCollection 274170 275095 +0.3% 1.00x(?)
ArrayAppendStrings 13601 13640 +0.3% 1.00x(?)
Join 1313 1311 -0.1% 1.00x(?)
ObjectiveCBridgeStubFromNSStringRef 206 206 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 949 951 +0.2% 1.00x(?)
StaticArray 4827 4828 +0.0% 1.00x(?)
ProtocolDispatch 5776 5773 -0.1% 1.00x(?)
ObjectAllocation 645 645 +0.0% 1.00x
SortSortedStrings 1410 1411 +0.1% 1.00x(?)
ArrayLiteral 1669 1667 -0.1% 1.00x(?)
ArrayAppendLatin1 104250 104185 -0.1% 1.00x
CharacterLiteralsLarge 13912 13955 +0.3% 1.00x(?)
Walsh 11993 12001 +0.1% 1.00x(?)
Dictionary2 3812 3821 +0.2% 1.00x(?)
StrComplexWalk 8449 8464 +0.2% 1.00x(?)
SetIntersect_OfObjects 11189 11165 -0.2% 1.00x
ErrorHandling 4093 4110 +0.4% 1.00x(?)
ArrayOfRef 8571 8559 -0.1% 1.00x(?)
ObserverUnappliedMethod 8442 8434 -0.1% 1.00x(?)
ObjectiveCBridgeToNSArray 28802 28846 +0.1% 1.00x(?)
DictionaryOfObjects 4760 4759 -0.0% 1.00x(?)
ObjectiveCBridgeStubToNSDateRef 3349 3355 +0.2% 1.00x(?)
PopFrontUnsafePointer 176885 176839 -0.0% 1.00x(?)
StringEqualPointerComparison 9739 9749 +0.1% 1.00x(?)
PolymorphicCalls 764 764 +0.0% 1.00x
RC4 7264 7253 -0.1% 1.00x(?)
ObjectiveCBridgeStubToNSStringRef 147 147 +0.0% 1.00x
Calculator 1029 1032 +0.3% 1.00x
ArrayAppendFromGeneric 657 658 +0.1% 1.00x(?)
MapReduce 36560 36547 -0.0% 1.00x(?)
MapReduceSequence 41464 41484 +0.1% 1.00x(?)
MapReduceShort 46918 46891 -0.1% 1.00x(?)
ObjectiveCBridgeStubDateMutation 515 515 +0.0% 1.00x
ArrayAppendUTF16 103372 103442 +0.1% 1.00x(?)
IterateData 11131 11122 -0.1% 1.00x(?)
DictionaryLiteral 12665 12669 +0.0% 1.00x(?)
DictionaryRemoveOfObjects 53119 52941 -0.3% 1.00x(?)
UTF8Decode 37023 37018 -0.0% 1.00x(?)
SortStringsUnicode 8806 8793 -0.1% 1.00x(?)
SetExclusiveOr 20758 20775 +0.1% 1.00x(?)
171 6462726 6467582 +0.1% 1.00x
SetIsSubsetOf 1620 1619 -0.1% 1.00x(?)
Dictionary 1811 1809 -0.1% 1.00x(?)
NopDeinit 43982 43988 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 25144 25072 -0.3% 1.00x(?)
SetIntersect 10612 10629 +0.2% 1.00x
ObjectiveCBridgeStubDataAppend 3852 3868 +0.4% 1.00x(?)
MapReduceClassShort 52029 52276 +0.5% 1.00x(?)
RGBHistogramOfObjects 89553 89499 -0.1% 1.00x(?)
ObjectiveCBridgeStubNSDateRefAccess 1186 1187 +0.1% 1.00x(?)
StrToInt 7527 7538 +0.1% 1.00x(?)
ArrayInClass 4488 4488 +0.0% 1.00x
ArrayOfGenericRef 9633 9622 -0.1% 1.00x(?)
StringHasSuffix 1787 1784 -0.2% 1.00x(?)
Phonebook 21528 21516 -0.1% 1.00x(?)
ObjectiveCBridgeStubDateAccess 1000 1000 +0.0% 1.00x
Sim2DArray 30531 30521 -0.0% 1.00x(?)
SetExclusiveOr_OfObjects 41093 41046 -0.1% 1.00x(?)
ArrayAppendRepeatCol 201603 201571 -0.0% 1.00x(?)
MapReduceShortString 235 235 +0.0% 1.00x
MonteCarloE 83142 83125 -0.0% 1.00x(?)
SetUnion_OfObjects 29703 29698 -0.0% 1.00x(?)
ReversedBidirectional 139240 139588 +0.2% 1.00x(?)
StringHasSuffixUnicode 62705 62698 -0.0% 1.00x(?)
ArrayAppendToGeneric 658 657 -0.1% 1.00x(?)
HashTest 5872 5864 -0.1% 1.00x(?)
SetIsSubsetOf_OfObjects 1611 1611 +0.0% 1.00x
ArrayAppend 3666 3668 +0.1% 1.00x(?)
DictionaryRemove 18887 18889 +0.0% 1.00x(?)
StringHasPrefixUnicode 15830 15823 -0.0% 1.00x(?)
LinkedList 33197 33191 -0.0% 1.00x(?)
MapReduceAnyCollection 36400 36399 -0.0% 1.00x(?)
MapReduceLazyCollection 33055 33049 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectForced 7120 7122 +0.0% 1.00x(?)
ArrayAppendSequence 71289 71435 +0.2% 1.00x(?)
ArrayAppendArrayOfInt 654 654 +0.0% 1.00x
ArrayOfPOD 1891 1892 +0.1% 1.00x
SetUnion 11672 11675 +0.0% 1.00x(?)
Chars 7358 7374 +0.2% 1.00x(?)
StringBuilder 2892 2889 -0.1% 1.00x(?)
ObserverForwarderStruct 4713 4718 +0.1% 1.00x(?)
ArrayValueProp2 4009 4008 -0.0% 1.00x(?)
AngryPhonebook 3082 3076 -0.2% 1.00x(?)
ArrayPlusEqualArrayOfInt 655 655 +0.0% 1.00x
SevenBoom 1604 1607 +0.2% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 72781 72780 -0.0% 1.00x(?)
StringWalk 22099 22093 -0.0% 1.00x(?)
ArrayValueProp 3403 3392 -0.3% 1.00x(?)
MapReduceClass 41803 41799 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSString 3957 3960 +0.1% 1.00x(?)
GlobalClass 0 0 +0.0% 1.00x
Dictionary2OfObjects 6213 6198 -0.2% 1.00x(?)
ArrayValueProp4 3701 3686 -0.4% 1.00x(?)
TwoSum 4637 4644 +0.1% 1.00x(?)
ArrayValueProp3 3769 3779 +0.3% 1.00x(?)
ObserverPartiallyAppliedMethod 8096 8083 -0.2% 1.00x(?)
ObjectiveCBridgeStubToNSString 1560 1573 +0.8% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 44142 44402 +0.6% 0.99x(?)
ArrayAppendOptionals 1297 1310 +1.0% 0.99x(?)
NSError 731 738 +1.0% 0.99x(?)
ObjectiveCBridgeStubURLAppendPath 216045 218340 +1.1% 0.99x(?)
MapReduceLazySequence 26711 26998 +1.1% 0.99x
ObjectiveCBridgeStubToArrayOfNSString 27419 27651 +0.8% 0.99x(?)
ObjectiveCBridgeToNSDictionary 60283 61077 +1.3% 0.99x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 74808 75191 +0.5% 0.99x(?)
NSStringConversion 1264 1274 +0.8% 0.99x(?)
DeadArray 128356 129002 +0.5% 0.99x(?)
ObjectiveCBridgeStubNSDataAppend 2647 2662 +0.6% 0.99x(?)
Hanoi 16689 17008 +1.9% 0.98x
ObjectiveCBridgeStubToNSDate 14571 14990 +2.9% 0.97x(?)
OpenClose 400 419 +4.8% 0.95x(?)
**Hardware Overview** Model Name: Mac mini Model Identifier: Macmini7,1 Processor Name: Intel Core i5 Processor Speed: 2.8 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 3 MB Memory: 16 GB

jrose-apple and others added 24 commits February 28, 2017 11:31
Those tests were missed because they are not executed currently by mistake (rdar://problem/30762030)
Most of the time, "generics" means "cannot be exposed to Objective-C"
and certainly "cannot be exposed in the generated header", but there
is one exception: imported Objective-C parameterized types, and their
extensions. We were previously dropping this on the floor and printing
`Foo</* BarType */>` in the generated header, which is nonsense.

https://bugs.swift.org/browse/SR-3480
[indexer] report defs/refs of parameters without a separate external name
Support opaque values inside open existential boxes
…caching-test

[Syntax] Reenable thread-safe caching test
…hat [take] [initialization] does not hightlight the ][ in between the two.
…led checked_cast_br cast.

Previously, we would put a destroy_value directly on the value that we tried to
cast. Since checked_cast_br is consuming, this would cause the destroy_value on
the failure path to be flagged as a double consume.

This commit causes SILGen to emit the value consumed by checked_cast_br as an
@owned argument to the failure BB, allowing semantic arc rules to be respected.

As an additional benefit, I also upgraded the ownership_model_eliminator test to
use semantic sil verification.

One issue that did come up though is that I was unable to use the new code in
all locations in the compiler. Specifically, there is one location in
SILGenPattern that uses argument unforwarding. I am going to need to undo
argument unforwarding in SILGenPattern in order to completely eliminate the old
code path.
This will make it easier to incrementally implement syntax nodes,
while allowing us to embed nodes that we do know about inside ones
that we don't.

https://bugs.swift.org/browse/SR-4062
This checking will also be used for other kinds of constraints (e.g.,
superclass constraints), so factor it out in advance.
Swift master uses LLVM swift-4.0-branch, which does not yet have
the lit change implementing this syntax.

This reverts commit dfd10ae.
…ax-children

[Syntax] Allow UnknownSyntax to have children
Add benchmark for quadratic hash performance
Dave Abrahams and others added 25 commits March 5, 2017 08:12
…shable

FloatingPoint should imply Hashable. 

 `Hashable` is related to `Equatable`, and `FloatingPoint` is `Equatable`, with enough additional constraints that `Hashable` conformance is practical.  

There's *almost* no excuse for any `Equatable` thing not to also be `Hashable`; the exception is when the underlying representation may be denormalized in some way that makes it impossible or expensive to normalize (e.g. `Set`).  Floating point numbers have denormalized forms, so this comes down to the cost of normalization.  Since we can't imagine a representation whose normalization is much more expensive than the subsequent hashing step, the conformance belongs.
…cts with trivial ownership should never have a cleanup.

rdar://29791263
… have the destructure operation yet.

rdar://29791263
…ng inst has conflicting ownership.

If SIL Ownership is enabled, we still trigger an unreachable.

rdar://29791263
…6_64.

I put in a small little kludge to add support for this. The better solution is
to refactor the supports_benchmark property from Platform to Target. We
already have a similar abstraction problem with armv7 target on Darwin, where we
explicitly turn off benchmarking.

*NOTE* Building the benchmarks for linux still requires more cmake work. I am
making some changes in a subsequent commit series to do this. If you try to
compile the benchmarks, you will hit an error where ninja says that it doesn't
know about the swift-benchmark-linux-x86_64 target.
Avoid some string copies.
Although it has no significant measurable effect, it makes me feel better.
This shrinks the name length if the same bound generic type is used multiple times, like: func foo(_ x: [Int], _ y: [Int])
It’s better to have a single definition of known types which is then used in the mangler, demangler and remangler.

NFC
Instead of appending a character for each substitution, we now prefix the substitution with the repeat count, e.g.
AbbbbB -> A5B

The same is done for known-type substitutions, e.g.
SiSiSi -> S3i

This significantly shrinks mangled names which contain large lists of the same type, like
  func foo(_ x: (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int))

rdar://problem/30707433
…compiling-stdlib-sutubs-cpp-for-arm

fix SR-4166: __mode__ attribute presence check changed.
@mtake mtake changed the title [benchmark] Compile and run benchmark on Linux Don't merge [benchmark] Compile and run benchmark on Linux Mar 6, 2017
@mtake mtake closed this Mar 6, 2017
@mtake mtake deleted the benchmark-on-linux branch March 6, 2017 07:00
@mtake
Copy link
Contributor Author

mtake commented Mar 6, 2017

I did a wrong commit again.
Opened a new PR #7928.

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.