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

[stdlib] Heterogeneous comparisons for concrete integer types #9909

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@moiseev
Member

moiseev commented May 24, 2017

With the introduction of heterogeneous overloads for equality and
comparison operators, it became possible to compare UInt to Int8 and
vice versa, but it also led to the problems like the one reported in:

https://bugs.swift.org/browse/SR-4984

(swift) UInt() != 0xFFFF_FFFF_FFFF_FFFF
<REPL Input>:1:11: error: integer literal '18446744073709551615' overflows when stored into 'Int'
UInt() != 0xFFFF_FFFF_FFFF_FFFF
          ^

In this case even in the presence of a homogeneous overload for !=,
the typechecker first tries Int as a type for a literal and
successfully finds a solution for the whole expression via a
heterogeneous overload.

At the same time UInt() == 0XFFFF_FFFF_FFFF_FFFF works, i.e. selects
the correct overload. Which means that homogeneous versions of derived
equality and comparison operators should be moved to concrete types, in
order to be preferred by the solver. And this is exactly what this
change is doing.

@moiseev

This comment has been minimized.

Member

moiseev commented May 24, 2017

@swift-ci Please test

@moiseev

This comment has been minimized.

Member

moiseev commented May 24, 2017

@swift-ci Please smoke benchmark

@moiseev

This comment has been minimized.

Member

moiseev commented May 24, 2017

@swift-ci Please Test Source Compatibility

stdlib/public/core/Integers.swift.gyb Outdated
@@ -2646,6 +2646,29 @@ public struct ${Self}
return Bool(Builtin.cmp_${u}lt_Int${bits}(lhs._value, rhs._value))
}
// FIXME(integers): these overloads are here in order for the compiler to
// prefer them to the generic ones on BinaryInteger, in cases like the
// following, where choosing Int as a literal type leads to overflow.

This comment has been minimized.

@dabrahams

dabrahams May 24, 2017

Member

the following? I don't see anything.

This comment has been minimized.

@moiseev

moiseev May 24, 2017

Member

Ah...

This comment has been minimized.

@moiseev

moiseev May 24, 2017

Member

I'll wait for all the triggered builds to succeed and then commit the missing code block.

@swift-ci

This comment has been minimized.

Contributor

swift-ci commented May 24, 2017

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 16b5b8e755f4ef2a155916d87aeb010adbe1f41f
Test requested by - @moiseev

@swift-ci

This comment has been minimized.

Contributor

swift-ci commented May 24, 2017

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 16b5b8e755f4ef2a155916d87aeb010adbe1f41f
Test requested by - @moiseev

@moiseev

This comment has been minimized.

Member

moiseev commented May 24, 2017

The failures are related to the constant propagation not being able to see through the @inline(__always), which in these cases can be replaced with @_transparent.

@moiseev moiseev force-pushed the moiseev:hetercomp branch May 24, 2017

@moiseev

This comment has been minimized.

Member

moiseev commented May 24, 2017

@swift-ci Please test

@moiseev

This comment has been minimized.

Member

moiseev commented May 24, 2017

@swift-ci Please Test Source Compatibility

@swift-ci

This comment has been minimized.

Contributor

swift-ci commented May 24, 2017

Build comment file:

Optimized (O)

Regression (1)
TEST OLD NEW DELTA SPEEDUP
SuffixSequenceLazy 4512 4803 +6.4% 0.94x (?)
No Changes (271)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 2939 2952 +0.4% 1.00x (?)
AnyHashableWithAClass 66685 66717 +0.0% 1.00x
Array2D 2023 2016 -0.3% 1.00x (?)
ArrayAppend 773 772 -0.1% 1.00x (?)
ArrayAppendArrayOfInt 597 597 +0.0% 1.00x
ArrayAppendAscii 22857 22857 +0.0% 1.00x
ArrayAppendFromGeneric 597 597 +0.0% 1.00x
ArrayAppendGenericStructs 1229 1241 +1.0% 0.99x (?)
ArrayAppendLatin1 42782 42624 -0.4% 1.00x (?)
ArrayAppendLazyMap 936 936 +0.0% 1.00x
ArrayAppendOptionals 1231 1231 +0.0% 1.00x
ArrayAppendRepeatCol 838 838 +0.0% 1.00x
ArrayAppendReserved 534 534 +0.0% 1.00x
ArrayAppendSequence 944 945 +0.1% 1.00x (?)
ArrayAppendStrings 13629 13599 -0.2% 1.00x
ArrayAppendToFromGeneric 597 597 +0.0% 1.00x
ArrayAppendToGeneric 598 597 -0.2% 1.00x
ArrayAppendUTF16 40770 40801 +0.1% 1.00x (?)
ArrayInClass 62 61 -1.6% 1.02x
ArrayLiteral 1222 1225 +0.2% 1.00x
ArrayOfGenericPOD 219 219 +0.0% 1.00x
ArrayOfGenericRef 3990 3992 +0.1% 1.00x (?)
ArrayOfPOD 166 166 +0.0% 1.00x
ArrayOfRef 3926 3946 +0.5% 0.99x (?)
ArrayPlusEqualArrayOfInt 598 597 -0.2% 1.00x
ArrayPlusEqualFiveElementCollection 4686 4658 -0.6% 1.01x (?)
ArrayPlusEqualSingleElementCollection 773 771 -0.3% 1.00x (?)
ArrayPlusEqualThreeElements 1584 1585 +0.1% 1.00x (?)
ArraySubscript 1469 1491 +1.5% 0.99x
ArrayValueProp 6 6 +0.0% 1.00x
ArrayValueProp2 6 6 +0.0% 1.00x
ArrayValueProp3 6 6 +0.0% 1.00x
ArrayValueProp4 6 6 +0.0% 1.00x
BitCount 13 13 +0.0% 1.00x
ByteSwap 0 0 +0.0% 1.00x
CStringLongAscii 5179 5191 +0.2% 1.00x (?)
CStringLongNonAscii 2296 2304 +0.3% 1.00x (?)
CStringShortAscii 5823 5820 -0.1% 1.00x (?)
Calculator 31 31 +0.0% 1.00x
CaptureProp 4624 4611 -0.3% 1.00x (?)
CharacterLiteralsLarge 8853 8857 +0.0% 1.00x (?)
CharacterLiteralsSmall 310 310 +0.0% 1.00x
Chars 1938 1938 +0.0% 1.00x
ClassArrayGetter 13 13 +0.0% 1.00x
DeadArray 182 182 +0.0% 1.00x
Dictionary 579 578 -0.2% 1.00x (?)
Dictionary2 1834 1834 +0.0% 1.00x
Dictionary2OfObjects 3359 3352 -0.2% 1.00x (?)
Dictionary3 472 471 -0.2% 1.00x
Dictionary3OfObjects 895 895 +0.0% 1.00x
DictionaryBridge 2623 2647 +0.9% 0.99x (?)
DictionaryLiteral 1491 1485 -0.4% 1.00x (?)
DictionaryOfObjects 2349 2345 -0.2% 1.00x (?)
DictionaryRemove 2799 2772 -1.0% 1.01x (?)
DictionaryRemoveOfObjects 23337 23353 +0.1% 1.00x (?)
DictionarySwap 429 429 +0.0% 1.00x
DictionarySwapOfObjects 6892 6980 +1.3% 0.99x (?)
DropFirstAnyCollection 56 56 +0.0% 1.00x
DropFirstAnyCollectionLazy 45101 45278 +0.4% 1.00x
DropFirstAnySeqCRangeIter 27395 27402 +0.0% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 27389 27385 -0.0% 1.00x (?)
DropFirstAnySeqCntRange 50 50 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 50 50 +0.0% 1.00x
DropFirstAnySequence 6813 6815 +0.0% 1.00x (?)
DropFirstAnySequenceLazy 6791 6789 -0.0% 1.00x (?)
DropFirstArray 25 25 +0.0% 1.00x
DropFirstArrayLazy 24 24 +0.0% 1.00x
DropFirstCountableRange 32 32 +0.0% 1.00x
DropFirstCountableRangeLazy 32 32 +0.0% 1.00x
DropFirstSequence 3083 3083 +0.0% 1.00x
DropFirstSequenceLazy 3031 3030 -0.0% 1.00x (?)
DropLastAnyCollection 22 22 +0.0% 1.00x
DropLastAnyCollectionLazy 15084 15044 -0.3% 1.00x
DropLastAnySeqCRangeIter 4630 4629 -0.0% 1.00x (?)
DropLastAnySeqCRangeIterLazy 4642 4641 -0.0% 1.00x (?)
DropLastAnySeqCntRange 16 16 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 16 16 +0.0% 1.00x
DropLastAnySequence 6853 6846 -0.1% 1.00x (?)
DropLastAnySequenceLazy 6551 6544 -0.1% 1.00x (?)
DropLastArray 8 8 +0.0% 1.00x
DropLastArrayLazy 8 8 +0.0% 1.00x
DropLastCountableRange 10 10 +0.0% 1.00x
DropLastCountableRangeLazy 10 10 +0.0% 1.00x
DropLastSequence 571 570 -0.2% 1.00x (?)
DropLastSequenceLazy 571 574 +0.5% 0.99x (?)
DropWhileAnyCollection 70 70 +0.0% 1.00x
DropWhileAnyCollectionLazy 103 103 +0.0% 1.00x
DropWhileAnySeqCRangeIter 22259 22270 +0.0% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 103 103 +0.0% 1.00x
DropWhileAnySeqCntRange 64 64 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 103 103 +0.0% 1.00x
DropWhileAnySequence 7604 7603 -0.0% 1.00x (?)
DropWhileAnySequenceLazy 2032 2032 +0.0% 1.00x
DropWhileArray 37 37 +0.0% 1.00x
DropWhileArrayLazy 78 78 +0.0% 1.00x
DropWhileCountableRange 36 36 +0.0% 1.00x
DropWhileCountableRangeLazy 68 68 +0.0% 1.00x
DropWhileSequence 3040 3060 +0.7% 0.99x
DropWhileSequenceLazy 65 65 +0.0% 1.00x
ErrorHandling 3140 3125 -0.5% 1.00x
GlobalClass 0 0 +0.0% 1.00x
Hanoi 3243 3246 +0.1% 1.00x (?)
HashTest 1764 1764 +0.0% 1.00x
Histogram 298 298 +0.0% 1.00x
Integrate 262 262 +0.0% 1.00x
IterateData 755 755 +0.0% 1.00x
Join 469 469 +0.0% 1.00x
LazilyFilteredArrays 64772 64782 +0.0% 1.00x (?)
LazilyFilteredRange 3898 3901 +0.1% 1.00x (?)
LinkedList 7054 7055 +0.0% 1.00x (?)
MapReduce 304 304 +0.0% 1.00x
MapReduceAnyCollection 331 332 +0.3% 1.00x (?)
MapReduceAnyCollectionShort 1979 1982 +0.2% 1.00x (?)
MapReduceClass 3073 3079 +0.2% 1.00x (?)
MapReduceClassShort 4520 4520 +0.0% 1.00x
MapReduceLazyCollection 15 15 +0.0% 1.00x
MapReduceLazyCollectionShort 44 44 +0.0% 1.00x
MapReduceLazySequence 90 90 +0.0% 1.00x
MapReduceSequence 451 454 +0.7% 0.99x (?)
MapReduceShort 1902 1922 +1.1% 0.99x (?)
MapReduceShortString 21 21 +0.0% 1.00x
MapReduceString 114 114 +0.0% 1.00x
Memset 234 235 +0.4% 1.00x
MonteCarloE 10262 10261 -0.0% 1.00x (?)
MonteCarloPi 44001 43996 -0.0% 1.00x (?)
NSDictionaryCastToSwift 5626 5523 -1.8% 1.02x (?)
NSError 290 291 +0.3% 1.00x (?)
NSStringConversion 750 749 -0.1% 1.00x (?)
NopDeinit 27444 27442 -0.0% 1.00x (?)
ObjectAllocation 179 179 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 23775 24256 +2.0% 0.98x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 4475 4495 +0.4% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 44322 44665 +0.8% 0.99x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 37797 38009 +0.6% 0.99x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 119104 118474 -0.5% 1.01x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 5346 5605 +4.8% 0.95x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 103679 99233 -4.3% 1.04x
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 90868 88993 -2.1% 1.02x (?)
ObjectiveCBridgeFromNSSetAnyObject 64648 64392 -0.4% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4147 4143 -0.1% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 71563 72016 +0.6% 0.99x
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 62042 62508 +0.8% 0.99x (?)
ObjectiveCBridgeFromNSString 1433 1414 -1.3% 1.01x (?)
ObjectiveCBridgeFromNSStringForced 2353 2351 -0.1% 1.00x
ObjectiveCBridgeStubDataAppend 3784 3753 -0.8% 1.01x
ObjectiveCBridgeStubDateAccess 181 181 +0.0% 1.00x
ObjectiveCBridgeStubDateMutation 272 272 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 29345 29228 -0.4% 1.00x (?)
ObjectiveCBridgeStubFromNSDate 3583 3585 +0.1% 1.00x (?)
ObjectiveCBridgeStubFromNSDateRef 3521 3526 +0.1% 1.00x
ObjectiveCBridgeStubFromNSString 901 900 -0.1% 1.00x (?)
ObjectiveCBridgeStubFromNSStringRef 174 174 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2368 2361 -0.3% 1.00x (?)
ObjectiveCBridgeStubNSDateMutationRef 12629 12861 +1.8% 0.98x (?)
ObjectiveCBridgeStubNSDateRefAccess 316 317 +0.3% 1.00x (?)
ObjectiveCBridgeStubToArrayOfNSString 28966 29105 +0.5% 1.00x (?)
ObjectiveCBridgeStubToNSDate 15251 15025 -1.5% 1.02x (?)
ObjectiveCBridgeStubToNSDateRef 3429 3438 +0.3% 1.00x (?)
ObjectiveCBridgeStubToNSString 1592 1593 +0.1% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 110 110 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 224754 223762 -0.4% 1.00x (?)
ObjectiveCBridgeStubURLAppendPathRef 230811 229315 -0.6% 1.01x (?)
ObjectiveCBridgeToNSArray 29221 29126 -0.3% 1.00x (?)
ObjectiveCBridgeToNSDictionary 45154 45667 +1.1% 0.99x
ObjectiveCBridgeToNSSet 39859 39834 -0.1% 1.00x (?)
ObjectiveCBridgeToNSString 1271 1271 +0.0% 1.00x
ObserverClosure 2324 2320 -0.2% 1.00x (?)
ObserverForwarderStruct 1136 1140 +0.4% 1.00x (?)
ObserverPartiallyAppliedMethod 3828 3827 -0.0% 1.00x (?)
ObserverUnappliedMethod 2645 2652 +0.3% 1.00x (?)
OpenClose 51 51 +0.0% 1.00x
Phonebook 6798 6790 -0.1% 1.00x
PolymorphicCalls 22 22 +0.0% 1.00x
PopFrontArray 1106 1106 +0.0% 1.00x
PopFrontArrayGeneric 1110 1112 +0.2% 1.00x (?)
PopFrontUnsafePointer 8974 8977 +0.0% 1.00x (?)
PrefixAnyCollection 56 57 +1.8% 0.98x
PrefixAnyCollectionLazy 45108 45134 +0.1% 1.00x
PrefixAnySeqCRangeIter 21597 21602 +0.0% 1.00x (?)
PrefixAnySeqCRangeIterLazy 21626 21594 -0.1% 1.00x (?)
PrefixAnySeqCntRange 50 50 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 50 50 +0.0% 1.00x
PrefixAnySequence 6076 6085 +0.1% 1.00x (?)
PrefixAnySequenceLazy 6062 6072 +0.2% 1.00x (?)
PrefixArray 25 25 +0.0% 1.00x
PrefixArrayLazy 24 24 +0.0% 1.00x
PrefixCountableRange 32 32 +0.0% 1.00x
PrefixCountableRangeLazy 32 32 +0.0% 1.00x
PrefixSequence 2619 2619 +0.0% 1.00x
PrefixSequenceLazy 2617 2617 +0.0% 1.00x
PrefixWhileAnyCollection 96 96 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 75 75 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 12568 12525 -0.3% 1.00x
PrefixWhileAnySeqCRangeIterLazy 75 75 +0.0% 1.00x
PrefixWhileAnySeqCntRange 90 90 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 75 75 +0.0% 1.00x
PrefixWhileAnySequence 14167 14273 +0.7% 0.99x (?)
PrefixWhileAnySequenceLazy 1492 1492 +0.0% 1.00x
PrefixWhileArray 62 62 +0.0% 1.00x
PrefixWhileArrayLazy 49 49 +0.0% 1.00x
PrefixWhileCountableRange 36 36 +0.0% 1.00x
PrefixWhileCountableRangeLazy 32 32 +0.0% 1.00x
PrefixWhileSequence 314 314 +0.0% 1.00x
PrefixWhileSequenceLazy 28 28 +0.0% 1.00x
Prims 793 792 -0.1% 1.00x (?)
ProtocolDispatch 3030 3031 +0.0% 1.00x (?)
ProtocolDispatch2 168 168 +0.0% 1.00x
RC4 159 159 +0.0% 1.00x
RGBHistogram 2397 2400 +0.1% 1.00x (?)
RGBHistogramOfObjects 24554 24535 -0.1% 1.00x (?)
RangeAssignment 298 297 -0.3% 1.00x (?)
RecursiveOwnedParameter 2320 2322 +0.1% 1.00x
ReversedArray 49 49 +0.0% 1.00x
ReversedBidirectional 29107 29089 -0.1% 1.00x (?)
ReversedDictionary 119 116 -2.5% 1.03x
SetExclusiveOr 3077 3053 -0.8% 1.01x (?)
SetExclusiveOr_OfObjects 9548 9539 -0.1% 1.00x (?)
SetIntersect 276 275 -0.4% 1.00x (?)
SetIntersect_OfObjects 1729 1731 +0.1% 1.00x (?)
SetIsSubsetOf 286 286 +0.0% 1.00x
SetIsSubsetOf_OfObjects 359 359 +0.0% 1.00x
SetUnion 2806 2800 -0.2% 1.00x (?)
SetUnion_OfObjects 8080 7960 -1.5% 1.02x (?)
SevenBoom 1471 1471 +0.0% 1.00x
Sim2DArray 276 276 +0.0% 1.00x
SortLargeExistentials 8021 8023 +0.0% 1.00x (?)
SortLettersInPlace 1146 1147 +0.1% 1.00x (?)
SortSortedStrings 832 835 +0.4% 1.00x
SortStrings 1629 1628 -0.1% 1.00x (?)
SortStringsUnicode 7535 7519 -0.2% 1.00x (?)
StackPromo 24048 24047 -0.0% 1.00x (?)
StaticArray 18 18 +0.0% 1.00x
StrComplexWalk 720 719 -0.1% 1.00x
StrToInt 2328 2335 +0.3% 1.00x (?)
StringAdder 0 0 +0.0% 1.00x
StringBuilder 1387 1386 -0.1% 1.00x (?)
StringBuilderLong 948 948 +0.0% 1.00x
StringEdits 193306 193498 +0.1% 1.00x (?)
StringEqualPointerComparison 7336 7495 +2.2% 0.98x (?)
StringFromLongWholeSubstring 11520 11506 -0.1% 1.00x (?)
StringFromLongWholeSubstringGeneric 126 126 +0.0% 1.00x
StringHasPrefix 16 16 +0.0% 1.00x
StringHasPrefixUnicode 14764 14752 -0.1% 1.00x
StringHasSuffix 16 16 +0.0% 1.00x
StringHasSuffixUnicode 62575 62687 +0.2% 1.00x
StringInterpolation 11195 11330 +1.2% 0.99x (?)
StringMatch 7061 7057 -0.1% 1.00x (?)
StringUTF16Builder 2217 2202 -0.7% 1.01x
StringWalk 1257 1258 +0.1% 1.00x
StringWithCString 136622 136607 -0.0% 1.00x (?)
SubstringFromLongString 98 98 +0.0% 1.00x
SubstringFromLongStringGeneric 183 183 +0.0% 1.00x
SuffixAnyCollection 23 23 +0.0% 1.00x
SuffixAnyCollectionLazy 15004 15002 -0.0% 1.00x (?)
SuffixAnySeqCRangeIter 5020 4955 -1.3% 1.01x
SuffixAnySeqCRangeIterLazy 4958 4975 +0.3% 1.00x (?)
SuffixAnySeqCntRange 16 16 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 16 16 +0.0% 1.00x
SuffixAnySequence 6738 6743 +0.1% 1.00x (?)
SuffixAnySequenceLazy 6567 6569 +0.0% 1.00x (?)
SuffixArray 8 8 +0.0% 1.00x
SuffixArrayLazy 8 8 +0.0% 1.00x
SuffixCountableRange 10 10 +0.0% 1.00x
SuffixCountableRangeLazy 10 10 +0.0% 1.00x
SuffixSequence 4585 4580 -0.1% 1.00x (?)
SuperChars 103366 103515 +0.1% 1.00x (?)
TwoSum 976 973 -0.3% 1.00x
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 257 257 +0.0% 1.00x
Walsh 349 350 +0.3% 1.00x
XorLoop 347 347 +0.0% 1.00x
**Unoptimized (Onone)**
Regression (1)
TEST OLD NEW DELTA SPEEDUP
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 7352 7974 +8.5% 0.92x (?)
Improvement (1)
TEST OLD NEW DELTA SPEEDUP
ObjectiveCBridgeFromNSSetAnyObjectForced 7631 7018 -8.0% 1.09x (?)
No Changes (270)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 4967 4968 +0.0% 1.00x (?)
AnyHashableWithAClass 84145 84116 -0.0% 1.00x (?)
Array2D 608884 609062 +0.0% 1.00x (?)
ArrayAppend 3739 3736 -0.1% 1.00x (?)
ArrayAppendArrayOfInt 649 651 +0.3% 1.00x
ArrayAppendAscii 61519 61508 -0.0% 1.00x (?)
ArrayAppendFromGeneric 655 654 -0.2% 1.00x
ArrayAppendGenericStructs 1294 1311 +1.3% 0.99x (?)
ArrayAppendLatin1 84103 84104 +0.0% 1.00x (?)
ArrayAppendLazyMap 213472 214091 +0.3% 1.00x (?)
ArrayAppendOptionals 1320 1301 -1.4% 1.01x (?)
ArrayAppendRepeatCol 215551 215549 -0.0% 1.00x (?)
ArrayAppendReserved 3557 3557 +0.0% 1.00x
ArrayAppendSequence 75348 75432 +0.1% 1.00x (?)
ArrayAppendStrings 13750 13704 -0.3% 1.00x (?)
ArrayAppendToFromGeneric 654 655 +0.2% 1.00x (?)
ArrayAppendToGeneric 655 654 -0.2% 1.00x (?)
ArrayAppendUTF16 81858 81888 +0.0% 1.00x (?)
ArrayInClass 4733 4734 +0.0% 1.00x (?)
ArrayLiteral 1763 1763 +0.0% 1.00x
ArrayOfGenericPOD 3077 3077 +0.0% 1.00x
ArrayOfGenericRef 9671 9789 +1.2% 0.99x (?)
ArrayOfPOD 1892 1892 +0.0% 1.00x
ArrayOfRef 8740 8739 -0.0% 1.00x (?)
ArrayPlusEqualArrayOfInt 652 651 -0.2% 1.00x (?)
ArrayPlusEqualFiveElementCollection 293173 293322 +0.1% 1.00x (?)
ArrayPlusEqualSingleElementCollection 290478 290330 -0.1% 1.00x (?)
ArrayPlusEqualThreeElements 10601 10616 +0.1% 1.00x
ArraySubscript 4188 4187 -0.0% 1.00x (?)
ArrayValueProp 3515 3495 -0.6% 1.01x (?)
ArrayValueProp2 18421 18453 +0.2% 1.00x (?)
ArrayValueProp3 3950 3949 -0.0% 1.00x
ArrayValueProp4 3842 3841 -0.0% 1.00x (?)
BitCount 172 172 +0.0% 1.00x
ByteSwap 26 26 +0.0% 1.00x
CStringLongAscii 5286 5276 -0.2% 1.00x (?)
CStringLongNonAscii 2388 2387 -0.0% 1.00x (?)
CStringShortAscii 9616 9629 +0.1% 1.00x (?)
Calculator 1179 1185 +0.5% 0.99x (?)
CaptureProp 109185 109191 +0.0% 1.00x (?)
CharacterLiteralsLarge 10224 10209 -0.1% 1.00x (?)
CharacterLiteralsSmall 1001 1002 +0.1% 1.00x (?)
Chars 51370 51364 -0.0% 1.00x (?)
ClassArrayGetter 931 930 -0.1% 1.00x
DeadArray 123075 122990 -0.1% 1.00x (?)
Dictionary 3059 3015 -1.4% 1.01x (?)
Dictionary2 3499 3492 -0.2% 1.00x (?)
Dictionary2OfObjects 5809 5804 -0.1% 1.00x (?)
Dictionary3 1359 1355 -0.3% 1.00x (?)
Dictionary3OfObjects 2254 2255 +0.0% 1.00x (?)
DictionaryBridge 2738 2724 -0.5% 1.01x (?)
DictionaryLiteral 8346 8326 -0.2% 1.00x (?)
DictionaryOfObjects 6000 5998 -0.0% 1.00x (?)
DictionaryRemove 21012 21002 -0.0% 1.00x (?)
DictionaryRemoveOfObjects 54860 54871 +0.0% 1.00x (?)
DictionarySwap 5533 5529 -0.1% 1.00x (?)
DictionarySwapOfObjects 19817 19760 -0.3% 1.00x (?)
DropFirstAnyCollection 19730 19731 +0.0% 1.00x (?)
DropFirstAnyCollectionLazy 140171 138812 -1.0% 1.01x (?)
DropFirstAnySeqCRangeIter 29905 29870 -0.1% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 29800 29789 -0.0% 1.00x (?)
DropFirstAnySeqCntRange 19780 19773 -0.0% 1.00x (?)
DropFirstAnySeqCntRangeLazy 19815 19812 -0.0% 1.00x (?)
DropFirstAnySequence 14450 14458 +0.1% 1.00x (?)
DropFirstAnySequenceLazy 13952 13959 +0.1% 1.00x (?)
DropFirstArray 6317 6316 -0.0% 1.00x (?)
DropFirstArrayLazy 45206 45184 -0.0% 1.00x (?)
DropFirstCountableRange 339 339 +0.0% 1.00x
DropFirstCountableRangeLazy 39067 39610 +1.4% 0.99x (?)
DropFirstSequence 13492 13488 -0.0% 1.00x (?)
DropFirstSequenceLazy 13192 13193 +0.0% 1.00x
DropLastAnyCollection 6566 6571 +0.1% 1.00x (?)
DropLastAnyCollectionLazy 46351 46085 -0.6% 1.01x (?)
DropLastAnySeqCRangeIter 43884 43889 +0.0% 1.00x (?)
DropLastAnySeqCRangeIterLazy 43827 43809 -0.0% 1.00x (?)
DropLastAnySeqCntRange 6613 6613 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 6575 6578 +0.0% 1.00x (?)
DropLastAnySequence 28991 28985 -0.0% 1.00x (?)
DropLastAnySequenceLazy 28997 29006 +0.0% 1.00x (?)
DropLastArray 2110 2110 +0.0% 1.00x
DropLastArrayLazy 15075 15070 -0.0% 1.00x
DropLastCountableRange 118 118 +0.0% 1.00x
DropLastCountableRangeLazy 12899 12899 +0.0% 1.00x
DropLastSequence 28596 28594 -0.0% 1.00x (?)
DropLastSequenceLazy 28608 28592 -0.1% 1.00x (?)
DropWhileAnyCollection 26272 26306 +0.1% 1.00x
DropWhileAnyCollectionLazy 27634 27619 -0.1% 1.00x (?)
DropWhileAnySeqCRangeIter 32034 32025 -0.0% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 27202 27134 -0.2% 1.00x (?)
DropWhileAnySeqCntRange 26266 26222 -0.2% 1.00x (?)
DropWhileAnySeqCntRangeLazy 27150 27157 +0.0% 1.00x (?)
DropWhileAnySequence 16065 16136 +0.4% 1.00x (?)
DropWhileAnySequenceLazy 12625 12626 +0.0% 1.00x (?)
DropWhileArray 9929 9912 -0.2% 1.00x (?)
DropWhileArrayLazy 16891 16867 -0.1% 1.00x (?)
DropWhileCountableRange 6224 6228 +0.1% 1.00x
DropWhileCountableRangeLazy 26403 26388 -0.1% 1.00x (?)
DropWhileSequence 15407 15407 +0.0% 1.00x
DropWhileSequenceLazy 11241 11245 +0.0% 1.00x (?)
ErrorHandling 7026 7048 +0.3% 1.00x (?)
GlobalClass 0 0 +0.0% 1.00x
Hanoi 17475 17504 +0.2% 1.00x (?)
HashTest 14981 14992 +0.1% 1.00x (?)
Histogram 8822 8825 +0.0% 1.00x (?)
Integrate 395 395 +0.0% 1.00x
IterateData 12534 12500 -0.3% 1.00x (?)
Join 1270 1271 +0.1% 1.00x (?)
LazilyFilteredArrays 1710433 1704961 -0.3% 1.00x (?)
LazilyFilteredRange 678149 678009 -0.0% 1.00x (?)
LinkedList 33180 33187 +0.0% 1.00x (?)
MapReduce 37931 37880 -0.1% 1.00x (?)
MapReduceAnyCollection 38121 37904 -0.6% 1.01x
MapReduceAnyCollectionShort 50050 50242 +0.4% 1.00x (?)
MapReduceClass 43153 43173 +0.0% 1.00x (?)
MapReduceClassShort 54575 54461 -0.2% 1.00x (?)
MapReduceLazyCollection 32635 32637 +0.0% 1.00x (?)
MapReduceLazyCollectionShort 43801 43644 -0.4% 1.00x (?)
MapReduceLazySequence 25290 25313 +0.1% 1.00x (?)
MapReduceSequence 41356 41362 +0.0% 1.00x (?)
MapReduceShort 50750 50647 -0.2% 1.00x (?)
MapReduceShortString 272 273 +0.4% 1.00x (?)
MapReduceString 2602 2585 -0.7% 1.01x (?)
Memset 43994 43993 -0.0% 1.00x (?)
MonteCarloE 133471 133418 -0.0% 1.00x (?)
MonteCarloPi 52610 52597 -0.0% 1.00x (?)
NSDictionaryCastToSwift 6652 6640 -0.2% 1.00x (?)
NSError 711 717 +0.8% 0.99x (?)
NSStringConversion 1302 1297 -0.4% 1.00x
NopDeinit 54802 54797 -0.0% 1.00x (?)
ObjectAllocation 1366 1370 +0.3% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 25806 26166 +1.4% 0.99x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 7798 8044 +3.2% 0.97x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 47136 46684 -1.0% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 39045 38769 -0.7% 1.01x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 125162 127666 +2.0% 0.98x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 99380 102585 +3.2% 0.97x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 95027 92030 -3.2% 1.03x (?)
ObjectiveCBridgeFromNSSetAnyObject 68586 69128 +0.8% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 76707 76841 +0.2% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 67528 66555 -1.4% 1.01x (?)
ObjectiveCBridgeFromNSString 4052 4053 +0.0% 1.00x (?)
ObjectiveCBridgeFromNSStringForced 2726 2725 -0.0% 1.00x (?)
ObjectiveCBridgeStubDataAppend 3726 3746 +0.5% 0.99x (?)
ObjectiveCBridgeStubDateAccess 1053 1053 +0.0% 1.00x
ObjectiveCBridgeStubDateMutation 515 515 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 29391 29448 +0.2% 1.00x (?)
ObjectiveCBridgeStubFromNSDate 4129 4128 -0.0% 1.00x (?)
ObjectiveCBridgeStubFromNSDateRef 4007 4007 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 921 922 +0.1% 1.00x (?)
ObjectiveCBridgeStubFromNSStringRef 216 216 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2718 2662 -2.1% 1.02x (?)
ObjectiveCBridgeStubNSDateMutationRef 15559 15304 -1.6% 1.02x (?)
ObjectiveCBridgeStubNSDateRefAccess 1211 1209 -0.2% 1.00x (?)
ObjectiveCBridgeStubToArrayOfNSString 29024 28649 -1.3% 1.01x (?)
ObjectiveCBridgeStubToNSDate 15429 15316 -0.7% 1.01x (?)
ObjectiveCBridgeStubToNSDateRef 3351 3373 +0.7% 0.99x (?)
ObjectiveCBridgeStubToNSString 1568 1567 -0.1% 1.00x
ObjectiveCBridgeStubToNSStringRef 149 149 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 226318 228956 +1.2% 0.99x (?)
ObjectiveCBridgeStubURLAppendPathRef 222657 227540 +2.2% 0.98x (?)
ObjectiveCBridgeToNSArray 28900 29026 +0.4% 1.00x (?)
ObjectiveCBridgeToNSDictionary 46277 45900 -0.8% 1.01x (?)
ObjectiveCBridgeToNSSet 40333 39850 -1.2% 1.01x (?)
ObjectiveCBridgeToNSString 1326 1324 -0.2% 1.00x (?)
ObserverClosure 6636 6611 -0.4% 1.00x (?)
ObserverForwarderStruct 4702 4692 -0.2% 1.00x
ObserverPartiallyAppliedMethod 8095 8101 +0.1% 1.00x (?)
ObserverUnappliedMethod 8689 8478 -2.4% 1.02x (?)
OpenClose 402 402 +0.0% 1.00x
Phonebook 22386 22357 -0.1% 1.00x (?)
PolymorphicCalls 2993 2989 -0.1% 1.00x (?)
PopFrontArray 7474 7468 -0.1% 1.00x (?)
PopFrontArrayGeneric 6457 6459 +0.0% 1.00x (?)
PopFrontUnsafePointer 97378 97047 -0.3% 1.00x
PrefixAnyCollection 19357 19598 +1.2% 0.99x (?)
PrefixAnyCollectionLazy 137212 140257 +2.2% 0.98x (?)
PrefixAnySeqCRangeIter 24122 24115 -0.0% 1.00x (?)
PrefixAnySeqCRangeIterLazy 23968 23970 +0.0% 1.00x (?)
PrefixAnySeqCntRange 19787 19780 -0.0% 1.00x (?)
PrefixAnySeqCntRangeLazy 19826 19820 -0.0% 1.00x (?)
PrefixAnySequence 12132 12248 +1.0% 0.99x (?)
PrefixAnySequenceLazy 12028 12023 -0.0% 1.00x (?)
PrefixArray 6315 6316 +0.0% 1.00x (?)
PrefixArrayLazy 45188 45252 +0.1% 1.00x (?)
PrefixCountableRange 339 339 +0.0% 1.00x
PrefixCountableRangeLazy 40071 38888 -3.0% 1.03x (?)
PrefixSequence 10917 10917 +0.0% 1.00x
PrefixSequenceLazy 11204 11188 -0.1% 1.00x (?)
PrefixWhileAnyCollection 37677 37690 +0.0% 1.00x (?)
PrefixWhileAnyCollectionLazy 22876 22876 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 40859 40853 -0.0% 1.00x (?)
PrefixWhileAnySeqCRangeIterLazy 22416 22419 +0.0% 1.00x (?)
PrefixWhileAnySeqCntRange 37692 37706 +0.0% 1.00x (?)
PrefixWhileAnySeqCntRangeLazy 22432 22434 +0.0% 1.00x (?)
PrefixWhileAnySequence 29505 29596 +0.3% 1.00x
PrefixWhileAnySequenceLazy 11555 11559 +0.0% 1.00x (?)
PrefixWhileArray 16972 16997 +0.1% 1.00x (?)
PrefixWhileArrayLazy 14686 14710 +0.2% 1.00x (?)
PrefixWhileCountableRange 17614 17608 -0.0% 1.00x (?)
PrefixWhileCountableRangeLazy 21764 21739 -0.1% 1.00x (?)
PrefixWhileSequence 28524 28524 +0.0% 1.00x
PrefixWhileSequenceLazy 10472 10471 -0.0% 1.00x (?)
Prims 9631 9592 -0.4% 1.00x (?)
ProtocolDispatch 6815 6780 -0.5% 1.01x (?)
ProtocolDispatch2 490 490 +0.0% 1.00x
RC4 19152 19153 +0.0% 1.00x (?)
RGBHistogram 34071 33958 -0.3% 1.00x (?)
RGBHistogramOfObjects 98948 98970 +0.0% 1.00x (?)
RangeAssignment 5683 5687 +0.1% 1.00x (?)
RecursiveOwnedParameter 9646 9651 +0.1% 1.00x (?)
ReversedArray 43917 44300 +0.9% 0.99x (?)
ReversedBidirectional 74952 74827 -0.2% 1.00x (?)
ReversedDictionary 25914 25912 -0.0% 1.00x (?)
SetExclusiveOr 21201 21184 -0.1% 1.00x (?)
SetExclusiveOr_OfObjects 41325 41245 -0.2% 1.00x (?)
SetIntersect 10644 10646 +0.0% 1.00x (?)
SetIntersect_OfObjects 11221 11222 +0.0% 1.00x (?)
SetIsSubsetOf 1632 1632 +0.0% 1.00x
SetIsSubsetOf_OfObjects 1509 1509 +0.0% 1.00x
SetUnion 11965 11998 +0.3% 1.00x (?)
SetUnion_OfObjects 29603 29583 -0.1% 1.00x (?)
SevenBoom 1600 1600 +0.0% 1.00x
Sim2DArray 30039 30033 -0.0% 1.00x (?)
SortLargeExistentials 17657 17640 -0.1% 1.00x (?)
SortLettersInPlace 2844 2843 -0.0% 1.00x (?)
SortSortedStrings 1408 1414 +0.4% 1.00x (?)
SortStrings 2480 2482 +0.1% 1.00x (?)
SortStringsUnicode 8855 8828 -0.3% 1.00x
StackPromo 99474 99069 -0.4% 1.00x (?)
StaticArray 4622 4623 +0.0% 1.00x (?)
StrComplexWalk 6973 6977 +0.1% 1.00x (?)
StrToInt 98694 98575 -0.1% 1.00x
StringAdder 50 50 +0.0% 1.00x
StringBuilder 7423 7402 -0.3% 1.00x (?)
StringBuilderLong 1140 1144 +0.4% 1.00x (?)
StringEdits 508304 504508 -0.7% 1.01x (?)
StringEqualPointerComparison 9528 9547 +0.2% 1.00x
StringFromLongWholeSubstring 11480 11476 -0.0% 1.00x (?)
StringFromLongWholeSubstringGeneric 151 151 +0.0% 1.00x
StringHasPrefix 1716 1712 -0.2% 1.00x (?)
StringHasPrefixUnicode 16191 16193 +0.0% 1.00x (?)
StringHasSuffix 1818 1819 +0.1% 1.00x
StringHasSuffixUnicode 64037 64001 -0.1% 1.00x (?)
StringInterpolation 14258 14364 +0.7% 0.99x (?)
StringMatch 30330 30304 -0.1% 1.00x (?)
StringUTF16Builder 8178 8138 -0.5% 1.00x (?)
StringWalk 4330 4302 -0.6% 1.01x (?)
StringWithCString 137100 136690 -0.3% 1.00x (?)
SubstringFromLongString 116 116 +0.0% 1.00x
SubstringFromLongStringGeneric 207 207 +0.0% 1.00x
SuffixAnyCollection 6470 6473 +0.0% 1.00x (?)
SuffixAnyCollectionLazy 45913 46577 +1.4% 0.99x (?)
SuffixAnySeqCRangeIter 41849 41847 -0.0% 1.00x (?)
SuffixAnySeqCRangeIterLazy 41840 41840 +0.0% 1.00x
SuffixAnySeqCntRange 6651 6654 +0.0% 1.00x (?)
SuffixAnySeqCntRangeLazy 6594 6595 +0.0% 1.00x (?)
SuffixAnySequence 26801 26795 -0.0% 1.00x (?)
SuffixAnySequenceLazy 26846 26838 -0.0% 1.00x (?)
SuffixArray 2111 2116 +0.2% 1.00x
SuffixArrayLazy 15072 15076 +0.0% 1.00x
SuffixCountableRange 118 118 +0.0% 1.00x
SuffixCountableRangeLazy 12901 12912 +0.1% 1.00x (?)
SuffixSequence 26755 26749 -0.0% 1.00x (?)
SuffixSequenceLazy 26383 26383 +0.0% 1.00x
SuperChars 213904 214076 +0.1% 1.00x (?)
TwoSum 4258 4259 +0.0% 1.00x (?)
TypeFlood 165 170 +3.0% 0.97x (?)
UTF8Decode 36935 36938 +0.0% 1.00x (?)
Walsh 11848 11842 -0.1% 1.00x (?)
XorLoop 23711 23706 -0.0% 1.00x (?)
**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
@xwu

This comment has been minimized.

Collaborator

xwu commented May 24, 2017

@moiseev This solution, being restricted to concrete types, means that the original issue still arises with generic code, yes?

That is, in the case of T() == 0xFFFF_FFFF_FFFF_FFFF, the RHS will be of type Int instead of type T?

@moiseev

This comment has been minimized.

Member

moiseev commented May 24, 2017

@xwu That is correct. The compiler shortcut that this patch uses only applies when the operators are defined on concrete types, so even though all the derived equality/comparison operators are implemented in an extension to BinaryInteger, in your example, the compiler will prefer the heterogeneous one and issue an overflow error.

The only cure I know of is T() == 0xFFFF_FFFF_FFFF_FFFF as T.

@moiseev

This comment has been minimized.

Member

moiseev commented May 24, 2017

@swift-ci Please test

@swift-ci

This comment has been minimized.

Contributor

swift-ci commented May 24, 2017

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 14c49451cf8b4c057f261331575dc976abf211df
Test requested by - @moiseev

@swift-ci

This comment has been minimized.

Contributor

swift-ci commented May 24, 2017

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 14c49451cf8b4c057f261331575dc976abf211df
Test requested by - @moiseev

[stdlib] Heterogeneous comparisons for concrete integer types
With the introduction of heterogeneous overloads for equality and
comparison operators, it became possible to compare UInt to Int8 and
vice versa, but it also led to the problems like the one reported in:

https://bugs.swift.org/browse/SR-4984

```
(swift) UInt() != 0xFFFF_FFFF_FFFF_FFFF
<REPL Input>:1:11: error: integer literal '18446744073709551615' overflows when stored into 'Int'
UInt() != 0xFFFF_FFFF_FFFF_FFFF
          ^
```

In this case even in the presence of a homogeneous overload for `!=`,
the typechecker first tries `Int` as a type for a literal and
successfully finds a solution for the whole expression via a
heterogeneous overload.

At the same time `UInt() == 0XFFFF_FFFF_FFFF_FFFF` works, i.e. selects
the correct overload. Which means that homogeneous versions of derived
equality and comparison operators should be moved to concrete types, in
order to be preferred by the solver. And this is exactly what this
change is doing.

@moiseev moiseev force-pushed the moiseev:hetercomp branch to acd98f1 May 24, 2017

@moiseev

This comment has been minimized.

Member

moiseev commented May 24, 2017

Argh.. forgot to include the @_transparent change.
@swift-ci Please test

@moiseev

This comment has been minimized.

Member

moiseev commented May 24, 2017

@swift-ci Please Test Source Compatibility

@xwu

This comment has been minimized.

Collaborator

xwu commented May 25, 2017

@moiseev If you were to sink heterogeneous !=, <=, >=, and > into a protocol called, say, _BinaryInteger and then had BinaryInteger : _BinaryInteger with the homogeneous protocol extension methods on BinaryInteger, I believe this would restore the desired behavior to code working with generic as well as concrete types.

@moiseev

This comment has been minimized.

Member

moiseev commented May 25, 2017

@xwu This might work... But isn't the price too high? We were getting rid of the underscored protocols...

@xwu

This comment has been minimized.

Collaborator

xwu commented May 25, 2017

@moiseev Your call, but in my opinion, better the underscored protocol where it's necessary than expose an inconsistent (and surprising) behavior to the end user.

Edit: I should add--two possible views about this fix here:

  1. You've minimized the undesired behavior so that it only occurs in generic code, an improvement on the status quo.

  2. By making the undesired behavior more rare, you've increased the surprise and decreased the likelihood of discovery when a user does unwittingly step on the problem, which is not an improvement over the status quo.

I think the question is whether (2) is concerning enough to merit a complete fix, even if that exposes an underscored protocol. I do think so, since the raison d'être of the revised integer protocols was to enable more/better generic code working with integers.

@moiseev

This comment has been minimized.

Member

moiseev commented May 25, 2017

@xwu There were discussions about a more general protocol above the BinaryInteger(just like in the floating point world), but it was deemed unnecessary. Now it would be good for purely technical reasons...

@moiseev

This comment has been minimized.

Member

moiseev commented May 25, 2017

@swift-ci Please Test Source Compatibility

@moiseev

This comment has been minimized.

Member

moiseev commented May 31, 2017

@swift-ci Please Test Source Compatibility

1 similar comment
@moiseev

This comment has been minimized.

Member

moiseev commented Jun 3, 2017

@swift-ci Please Test Source Compatibility

@moiseev moiseev closed this Jan 10, 2018

@moiseev moiseev deleted the moiseev:hetercomp branch Jan 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment