Skip to content

Turn on 'as' bridging for Linux (2) #16736

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 31, 2018

Conversation

millenomi
Copy link
Contributor

@millenomi millenomi commented May 19, 2018

(This is a second attempt at #16022.)

Turn on some of the same kinds of bridging on Linux as Swift already allows on Darwin, reducing language differences between platforms.

The following bridging situations will now work the same from a developer's perspective on Linux as they do on Darwin:

  • bridging known struct types and numeric types to Foundation reference types and vice versa (NSString(…) as String, "abc" as NSString, 1.23 as NSNumber).
  • bridging arbitrary Swift values to opaque (_SwiftValue) reference types and vice versa (with struct X {}: ([X(), X(), X()] as NSArray) as! [X] will work).
  • bridging Optional<_>.none to an appropriate object and back. (If Foundation is available, we will use NSNull as the object, to match Darwin behavior. For example, (([nil, nil, nil] as [Int?]) as NSArray) as! [Int?] will work, and the NSArray will be [NSNull(), NSNull(), NSNull()] like it is on Darwin.)

Just like on Darwin, these objects are all laid out identically to CFTypeRefs, meaning for example that an array of these values, including opaque boxed values, can be casted to CFArrayRef and back correctly just like it can on Darwin. Likewise, if Foundation is linked, these opaque objects will be castable to Foundation.NSObject and implement Foundation.NSCopying just like they can on Darwin; while this isn't part of the contract for these objects, code that unwittingly relies on this will continue to work on Linux as well.

This does not target enabling other as{,?,!} casts that work on Darwin but not on Linux that strictly require the ObjC runtime:

  • Any value whose type is a metatype X.self from/to AnyObject
  • Closures from/to AnyObject

This patch must land in lockstep with a separate Foundation patch (at swiftlang/swift-corelibs-foundation#1526). This patch doesn't require that applications link Foundation; apps that do not link it will still be able to use as AnyObject casts for any value to turn it into a bridged object, if they implement _ObjectiveCBridgeable (which still remains an implementation detail), or an opaque boxed value; this also reflects Swift language behavior for Darwin applications that do not import Foundation. One difference with Darwin is that in this case the opaque box returned by casting will not be a NSObject, since that's only available if Foundation is.

@millenomi
Copy link
Contributor Author

Please test with the following:
swiftlang/swift-corelibs-foundation#1526

@swift-ci please smoke test

@gottesmm
Copy link
Contributor

@millenomi just a quick check: did you use the eager bridging stub? At some point we are going to want to try to enable that. (TBH I didn't look through the PR I just wanted to make sure that you were aware of this and if it was necessary used it).

@millenomi
Copy link
Contributor Author

I’m not sure what you mean by that, unless that’s how _bridgeAnythingToObjectiveC is referred to? Do you have pointers?

@millenomi
Copy link
Contributor Author

@gottesmm for the question above.

cc for review: @jckarter @jrose-apple @rjmccall @rudkx — Thanks for your time taking a look at this; some feedback from #16022 has been applied. I would prefer if possible to tackle moving the Swift bits to C++ in a follow-up patch and keep the class hierarchy the same, but we can discuss options on this.

@millenomi
Copy link
Contributor Author

Please test with the following:
swiftlang/swift-corelibs-foundation#1526

@swift-ci please smoke test

@millenomi
Copy link
Contributor Author

cc @itaiferber for changes to Codable.swift.gyb.

@@ -1180,7 +1180,7 @@ public enum EncodingError : Error {
public var _userInfo: AnyObject? {
// The error dictionary must be returned as an AnyObject. We can do this
// only on platforms with bridging, unfortunately.
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
#if _runtime(_ObjC)
Copy link
Contributor

Choose a reason for hiding this comment

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

We could actually remove this #if now, right? We should be able to return [String : Any] as AnyObject on all platforms, yeah?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, yeah :)

@gottesmm
Copy link
Contributor

@millenomi Sorry I missed your question. Here is the code:

3214627

Context: rdar://35943342

@jckarter
Copy link
Contributor

I'm still concerned about dynamically changing the bridging behavior based on the presence of Foundation. That would create a schism between Foundation-using and non-Foundation-using libraries, and mean that the former can't be dynamically loaded. If value boxes need to be NSCopying, then can you extend the class to be NSCopying from Foundation? We never really wanted _SwiftValue to be an NSObject subclass even on Darwin, and it'd be nice if that were the way things began on Linux, but if we really must make boxed values be NSObject subclasses when Foundation is loaded, we should look into doing so in a way that doesn't invalidate boxed values that exist from before loading Foundation. For instance, we could make it so that boxing uses heap objects that start out with non-class heap metadata, and overwrite the metadata with an NSObject subclass when Foundation gets loaded.

Copy link
Contributor

@rudkx rudkx left a comment

Choose a reason for hiding this comment

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

I reviewed the code changes to Sema and they all look good. I skimmed some of the other changes, and just have some comments/questions regarding the tests.

@@ -1134,22 +1134,19 @@ bool swift::canUseScalarCheckedCastInstructions(SILModule &M,
if (!objectType.isAnyClassReferenceType())
return false;

if (M.getASTContext().LangOpts.EnableObjCInterop) {
auto super = archetype->getSuperclass();
Copy link
Contributor

Choose a reason for hiding this comment

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

The indentation here should be fixed to match the surrounding code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok!



var x: Any = 1
var y = x as AnyObject // expected-error{{not convertible}}
Copy link
Contributor

Choose a reason for hiding this comment

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

We should keep this test, but change the expected output.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok!

@@ -1,18 +0,0 @@
// RUN: %empty-directory(%t)
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly I think it makes sense to keep this test and update the comment and expected output.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Similarly, ok :)

@@ -158,16 +158,6 @@ print(allToAll(type(of: C()), AnyObject.self)) // CHECK-NEXT: true
// Bridging
print(allToAll(0, AnyObject.self)) // CHECK-NEXT: true

// This will get bridged using _SwiftValue.
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the behavioral change here? It looks like it applies to macOS as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad; this is an artifact of development where _SwiftValue was not yet available. It will be restored as-is.

@gottesmm
Copy link
Contributor

Question. @millenomi do you think it would make sense to just enable eager bridging straight up now on Linux? It would make optimizing arrays significantly easier and prevent the lazy behavior that really hurts the optimizer on macOS.

I would rather us stay away from those legacy problems on Linux if we can.

@gottesmm
Copy link
Contributor

@millenomi Just to be complete: these are design flaws from the optimizer's perspective.

  1. Any type of associated object like functionality by default (I'd be ok with opt in). The issue is this makes the optimizer be extremely conservative when analyzing deinits.
  2. Any type of swizzling of methods/etc (I'd be ok again if this is opt in). This is another way thing that doing them by default hurts the optimizer.
  3. Any type of lazy bridging. This makes simple operations like subscripting much more complicated for the optimizer to analyze. It makes simple subscripting operations far more dynamic than they need to be.
  4. We really do not want Foundation to be special. Why should it be special? Is there a large benefit to doing so?

@eeckstein eeckstein self-requested a review May 21, 2018 20:02
Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

I agree with @gottesmm. There are potentially considerable performance implication. I suggest that you at least run the swift benchmarks on linux before and after the change. Unfortunately the linux benchmarks cannot be run in the CI. But it is easy to run the benchmarks locally on a linux machine. Can you please then copy the results into this PR?

@millenomi
Copy link
Contributor Author

@gottesmm The code modified by 3214627 is not compiled on Linux.

On Linux, there is Core Foundation but no ObjC runtime. This means that there is no need to consider invocations to ObjC classes; it is my understanding that those are the reason the bridging paths are not on Darwin. The use case here is instead for interop with Core Foundation, which contains the ultimate implementation of many basic algorithms and is used by swift-corelibs-foundation to ensure behavior remains close to Darwin, and source and behavior interop when bridging is invoked by user code, which unfortunately is necessary for use of some Foundation API that return Any (like NSKeyedUnarchiver).

Thus, we have decided to not use the stdlib potentially-lazy bridging approach. Instead, we use the current behavior of the bridging primitives in s-c-f, which bridge eagerly at the transition point. The code you point to is guarded by #if _runtime(ObjC); what story do we want to have on that one? Do we need to expose that compiler intrinsic on Linux? How would it interface with Foundation? (Foundation sits below the stdlib on ObjC but above it on Linux.)

Insofar as the other points you mention:

  1. Thanks to eager bridging, we do not have associated object use for this patch.

  2. Swizzling isn’t available on Linux.

  3. All bridging done here is eager.

  4. We would like Foundation not to be special per se, but to be equally special across platforms. In this case, reference types have been discussed already as both a way to work around some rare issues with value types and as an important element of its goal of allowing people to produce predictably interoperable code — write and test on Darwin and deploy on Linux and have a reasonably clear picture of how the code will behave if it compiles. This is why it gets to use compiler SPI such as _ObjectiveCBridgeable, and why this patch to ensure it works the same on the cases that make sense for Linux developers to use.

@gottesmm
Copy link
Contributor

What that function does is just use a stub that we can use to add eager bridging in an ABI preserving way when/if we enable eager bridging on macOS.

Those 4 things were more things to keep in mind when messing with stuff like this. We do not want anything like any of those 4 things to make the Linux implementation more conservative than necessary. I was not saying that this patch does all of those things.

That being said, as long as the bridging is eager, I am ok with this.

One unfortunate aspect of this is that since the benchmarks do not build on Linux I do not think that you can run these and validate the performance. Maybe we should fix that first so we can actually see how this is effecting the benchmarks?

@millenomi
Copy link
Contributor Author

@jckarter One of the targets of this patch is to prevent silent dependency scenarios. A typical example is NSSecureCoding implementations:

class Problem: NSSecureCoding {  }

class ProblemHolder: NSSecureCoding {required init?(coder: NSCoder) {
    guard let problems = coder.decode(of: [NSArray.self, Problem.self], forKey: "MaybeNinetyNineProblems") as? [Problem] else {  }
   
  }}

the as? [Problem] cast is perfectly valid on Darwin, and we currently do not have a way that we share between Darwin and Linux of decoding value types. Note how here it introduces an unexpected failure point — returning nil from the cast will make it impossible to read a valid archive.

The misgivings you have re: NSObject are of a similar silent nature. On Darwin, as? NSObject queries are true for boxed objects, just like as? NSCopying ones. While we do not guarantee it, the goal is predictability: this kind of dependency is allowed on Darwin, has different behavior silently on Linux and is not really detectable at compile time (would you deny casting any Any to NSObject?)

I'd rather be thorough here than not. I understand this prevents an application from dlopen()ing Foundation-linking libraries unless it itself links Foundation — I'll note tho that the supported API for loading libraries that apps are likely to be using is in Foundation (the Bundle class). Still, yours is a concern that I tried to work around several times in this patch to little avail (including, at one point, moving NSObject down to the stdlib, breaking several method signatures on the base class that require Foundation types).

Any solution I can come up with so far has significant drawbacks, and this looked like a sweet spot in behavior and drawback. Any improvement suggestion is welcome.

@millenomi
Copy link
Contributor Author

@gottesmm I'll look into running benchmarks on Linux and see if there's anything I can do to fix or have them fixed.

@millenomi
Copy link
Contributor Author

(To be clear: we do have a way that we share between Darwin and Linux to (de)serialize value types, Codable, but there are important use cases for reading and writing NSKeyedArchiver archives on Linux and there's no interface to that currently that allows for value types unless bridging is present.)

@jckarter
Copy link
Contributor

jckarter commented May 22, 2018

The misgivings you have re: NSObject are of a similar silent nature. On Darwin, as? NSObject queries are true for boxed objects, just like as? NSCopying ones. While we do not guarantee it, the goal is predictability: this kind of dependency is allowed on Darwin, has different behavior silently on Linux and is not really detectable at compile time (would you deny casting any Any to NSObject?)

Predictability is all well and good within reason, but I think the solution here trades one impredictability for worse and harder-to-manage ones. I would expect as? NSObject casts to be relatively rare, since in practice everything on Darwin is NSObject-like-enough for that question to be largely unnecessary. A quick Github code search seems to bear that out: https://github.com/search?l=Swift&p=1&q=%22as+NSObject%22&type=Code From the examples of as! NSObject I could find, it looks like they're all expecting something that either is an NSObject subclass or is bridgable to one (or they're wrong—x as! NSObject == NSNull() should just be x as AnyObject === NSNull(), for instance). Boxed values are not NSCoding on either Darwin or Linux, so boxes not being NSObject subclasses shouldn't be an issue in archive compatibility. We could also get predictable behavior here by following through on making the Darwin version of _SwiftValue a non-NSObject class.

I'd rather be thorough here than not. I understand this prevents an application from dlopen()ing Foundation-linking libraries unless it itself links Foundation — I'll note tho that the supported API for loading libraries that apps are likely to be using is in Foundation (the Bundle class). Still, yours is a concern that I tried to work around several times in this patch to little avail (including, at one point, moving NSObject down to the stdlib, breaking several method signatures on the base class that require Foundation types).

Using dlopen and dlsym from Swift is supported too. We shouldn't break it.

@millenomi
Copy link
Contributor Author

millenomi commented May 22, 2018

I am very worried for the churn I see in trying to implement your proposal, in particular:

  • Since I cannot express generically an existential of the form 'This thing is Hashable but may belong to one of two different class hierarchies', any usage of NSObject in a Hashable context (e.g. dictionary key, which s-c-f is rife with) within swift-corelibs-foundation now needs to have additional as! casts to go to and from AnyHashable to accommodate a non-NSObject box. This makes decently-sized chunks of that codebase type unsafe, in the sense that it will shift correctness checking at runtime.

  • We'd need to redo how CFEqual() and CFHash() interact with objects, as right now they are looking up and invoking NSObject class methods on them.

(Silly idea: is it possible for us to 'fake' reparenting a stdlib _SwiftValue to be of NSObject type if they're laid out identically in memory?)

@jckarter
Copy link
Contributor

(Silly idea: is it possible for us to 'fake' reparenting a stdlib _SwiftValue to be of NSObject type if they're laid out identically in memory?)

It's not silly at all. Since NSObject doesn't have any storage, it wouldn't be unreasonable to try dynamically turning the boxed value metadata into an NSObject subclass. We would however need to know the extents of the NSObject class object, which would require knowing a maximum size for its vtable, which may not be acceptable depending on how much freedom you all want for adding new members to NSObject in the future.

@jckarter
Copy link
Contributor

Since I cannot express generically an existential of the form 'This thing is Hashable but may belong to one of two different class hierarchies', any usage of NSObject in a Hashable context (e.g. dictionary key, which s-c-f is rife with) within swift-corelibs-foundation now needs to have additional as! casts to go to and from AnyHashable to accommodate a non-NSObject box. This makes decently-sized chunks of that codebase type unsafe, in the sense that it will shift correctness checking at runtime.

Note that NSObject as the key type on Darwin is already kind-of a lie. A Swift dictionary with keys of a Swift class type that's Hashable but not an NSObject subclass will still blindly bridge to [NSObject: AnyObject]. _SwiftObject quacks enough like an NSObject on Darwin that maybe you won't notice, but that issue might be more glaring on Linux.

Copy link
Contributor

@jckarter jckarter left a comment

Choose a reason for hiding this comment

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

Lily, Tony, and I met in person, and I'm ok with taking this patch as is for now and pursuing cleanups as followup tasks:

https://bugs.swift.org/browse/SR-7767
https://bugs.swift.org/browse/SR-7768
https://bugs.swift.org/browse/SR-7769

@millenomi millenomi force-pushed the LinuxAsBridging_2 branch from 2afb116 to 94f8470 Compare May 25, 2018 20:35
@millenomi
Copy link
Contributor Author

@rudkx I have readded (and where necessary, reworked) the tests you pointed to. How does this look?

@millenomi
Copy link
Contributor Author

Please test with the following:
swiftlang/swift-corelibs-foundation#1526

@swift-ci please smoke test

Copy link
Contributor

@rudkx rudkx left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@millenomi
Copy link
Contributor Author

@eeckstein @gottesmm How do we want to proceed with benchmarks? After landing?

@gottesmm
Copy link
Contributor

I am pretty close. Let me see what I can do tonight.

@millenomi
Copy link
Contributor Author

@gottesmm Thank you so much for the after hours help!

@gottesmm
Copy link
Contributor

Got it to work. I am going to go grab a coffee/upstream. It is slightly manual (it is an external build), but I have a script that you just need to pass in the args and it will just work.

@millenomi
Copy link
Contributor Author

@gottesmm Thanks! I’ll sync up with you after the holiday.

@millenomi
Copy link
Contributor Author

Please test with the following:
swiftlang/swift-corelibs-foundation#1526

@swift-ci please smoke benchmark

@millenomi millenomi force-pushed the LinuxAsBridging_2 branch from 94f8470 to f7a28a8 Compare May 31, 2018 00:52
@millenomi
Copy link
Contributor Author

Please test with the following:
swiftlang/swift-corelibs-foundation#1526

@swift-ci please smoke test

@millenomi
Copy link
Contributor Author

millenomi commented May 31, 2018

@eeckstein @gottesmm Benchmarks have been taken:

perf-patch-applied.txt
perf-master-baseline.txt

These benchmarks include the fixes I just pushed, which prevent a large slowdown (22x) in AnyHashable tests. Some slowdowns are expected, given that we are enabling paths that do more work during casting; as a summary, the following tests have a slowdown (ratio of means) over 10%:

TEST SLOWDOWN
AnyHashableWithAClass 1.80
ArrayAppend 2.60
ArrayAppendAscii 1.17
CStringLongAscii 1.23
CStringLongNonAscii 1.11
CharacterPropertiesFetch 1.21
DataAppendArray 1.18
DataAppendBytes 1.25
DataAppendDataMediumToMedium 1.20
DataAppendDataSmallToMedium 1.25
DictionarySwapAt 1.16
DropLastSequence 1.12
DropLastSequenceLazy 1.12
MapReduceShort 1.13
SortStringsUnicode 1.12
StringWithCString 1.22

Numbers have been generated by merging #16882 and running:

utils/build-script --preset="buildbot_linux,no_test" install_destdir=~/Install/root installable_package=~/Install/archive
benchmark/scripts/build_linux.py `which cmake` ~/Developer/Sources/Swift/swift ~/Developer/Sources/Swift/build/buildbot_linux/llvm-linux-x86_64/bin/clang ~/Install/root/usr ~/Install/benchmark --clean
~/Install/benchmark/bin/Benchmark_O --num-samples=5

I am at this point really inclined to investigate these as a follow-up; is that ok with you?

@millenomi
Copy link
Contributor Author

(an enormous thank you to @gottesmm for his timely work on #16882.)

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (9)
TEST OLD NEW DELTA SPEEDUP
StringBuilderWithLongSubstring 1466 1690 +15.3% 0.87x (?)
ReversedBidirectional 16744 18899 +12.9% 0.89x (?)
FloatingPointPrinting_Float_interpolated 39871 44505 +11.6% 0.90x
CharIndexing_tweet_unicodeScalars 33456 36858 +10.2% 0.91x
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 43710 47803 +9.4% 0.91x (?)
DataCopyBytes 471 510 +8.3% 0.92x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 4817 5198 +7.9% 0.93x (?)
DataAppendDataSmallToSmall 5766 6190 +7.4% 0.93x (?)
DropWhileAnySeqCRangeIter 21243 22596 +6.4% 0.94x
Improvement (12)
TEST OLD NEW DELTA SPEEDUP
StringBuilderLong 1716 1252 -27.0% 1.37x (?)
ArrayAppendAscii 4514 3949 -12.5% 1.14x (?)
PopFrontUnsafePointer 9666 8765 -9.3% 1.10x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 50769 46078 -9.2% 1.10x (?)
DropLastAnySeqCntRange 14 13 -7.1% 1.08x
DropLastAnySeqCntRangeLazy 14 13 -7.1% 1.08x
ObjectiveCBridgeStubToNSDate 16298 15276 -6.3% 1.07x (?)
CharIndexing_chinese_unicodeScalars 13969 13120 -6.1% 1.06x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 116593 109860 -5.8% 1.06x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 5702 5408 -5.2% 1.05x (?)
NSDictionaryCastToSwift 7230 6871 -5.0% 1.05x (?)
DataAppendArray 5530 5263 -4.8% 1.05x
No Changes (417)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 4248 4122 -3.0% 1.03x (?)
AnyHashableWithAClass 85921 86555 +0.7% 0.99x
Array2D 2850 2854 +0.1% 1.00x (?)
ArrayAppend 1081 1078 -0.3% 1.00x (?)
ArrayAppendArrayOfInt 789 798 +1.1% 0.99x (?)
ArrayAppendAsciiSubstring 24241 24246 +0.0% 1.00x (?)
ArrayAppendFromGeneric 794 800 +0.8% 0.99x (?)
ArrayAppendGenericStructs 1425 1428 +0.2% 1.00x (?)
ArrayAppendLatin1 41379 41316 -0.2% 1.00x
ArrayAppendLatin1Substring 141877 141706 -0.1% 1.00x (?)
ArrayAppendLazyMap 1344 1342 -0.1% 1.00x (?)
ArrayAppendOptionals 1428 1427 -0.1% 1.00x (?)
ArrayAppendRepeatCol 1329 1338 +0.7% 0.99x (?)
ArrayAppendReserved 812 813 +0.1% 1.00x (?)
ArrayAppendSequence 1121 1121 +0.0% 1.00x
ArrayAppendStrings 6213 6213 +0.0% 1.00x
ArrayAppendToFromGeneric 799 798 -0.1% 1.00x (?)
ArrayAppendToGeneric 789 784 -0.6% 1.01x (?)
ArrayAppendUTF16 41027 41013 -0.0% 1.00x (?)
ArrayAppendUTF16Substring 139440 140294 +0.6% 0.99x
ArrayInClass 86 86 +0.0% 1.00x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 151 151 +0.0% 1.00x
ArrayOfGenericRef 4496 4500 +0.1% 1.00x
ArrayOfPOD 183 184 +0.5% 0.99x
ArrayOfRef 4400 4428 +0.6% 0.99x (?)
ArrayPlusEqualArrayOfInt 796 796 +0.0% 1.00x
ArrayPlusEqualFiveElementCollection 5452 5458 +0.1% 1.00x (?)
ArrayPlusEqualSingleElementCollection 1080 1084 +0.4% 1.00x (?)
ArrayPlusEqualThreeElements 1668 1658 -0.6% 1.01x (?)
ArraySubscript 1535 1533 -0.1% 1.00x (?)
ArrayValueProp 8 8 +0.0% 1.00x
ArrayValueProp2 8 8 +0.0% 1.00x
ArrayValueProp3 8 8 +0.0% 1.00x
ArrayValueProp4 8 8 +0.0% 1.00x
BinaryFloatingPointPropertiesBinade 31 31 +0.0% 1.00x
BinaryFloatingPointPropertiesNextUp 28 28 +0.0% 1.00x
BinaryFloatingPointPropertiesUlp 37 37 +0.0% 1.00x
BitCount 211 212 +0.5% 1.00x
ByteSwap 105 105 +0.0% 1.00x
COWArrayGuaranteedParameterOverhead 9819 9805 -0.1% 1.00x (?)
COWTree 5322 5365 +0.8% 0.99x (?)
CSVParsing 667267 660841 -1.0% 1.01x (?)
CSVParsingAlt 806841 801865 -0.6% 1.01x (?)
CSVParsingAltIndices 339715 339907 +0.1% 1.00x (?)
CStringLongAscii 4207 4208 +0.0% 1.00x (?)
CStringLongNonAscii 2440 2438 -0.1% 1.00x (?)
CStringShortAscii 3348 3345 -0.1% 1.00x (?)
Calculator 317 316 -0.3% 1.00x (?)
CaptureProp 4129 4128 -0.0% 1.00x (?)
ChainedFilterMap 1247 1247 +0.0% 1.00x
CharIndexing_ascii_unicodeScalars 17551 17286 -1.5% 1.02x (?)
CharIndexing_ascii_unicodeScalars_Backwards 16851 16833 -0.1% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 12759 12760 +0.0% 1.00x (?)
CharIndexing_japanese_unicodeScalars 21249 20754 -2.3% 1.02x (?)
CharIndexing_japanese_unicodeScalars_Backwards 20274 20222 -0.3% 1.00x (?)
CharIndexing_korean_unicodeScalars 16761 16814 +0.3% 1.00x (?)
CharIndexing_korean_unicodeScalars_Backwards 16317 16392 +0.5% 1.00x
CharIndexing_punctuatedJapanese_unicodeScalars 3116 3116 +0.0% 1.00x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 3046 3175 +4.2% 0.96x
CharIndexing_punctuated_unicodeScalars 4094 3934 -3.9% 1.04x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 3800 3800 +0.0% 1.00x
CharIndexing_russian_unicodeScalars 14872 14424 -3.0% 1.03x (?)
CharIndexing_russian_unicodeScalars_Backwards 14051 14045 -0.0% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 32940 32981 +0.1% 1.00x (?)
CharIndexing_utf16_unicodeScalars 23200 23675 +2.0% 0.98x (?)
CharIndexing_utf16_unicodeScalars_Backwards 23418 23420 +0.0% 1.00x (?)
CharIteration_ascii_unicodeScalars 21762 21779 +0.1% 1.00x
CharIteration_ascii_unicodeScalars_Backwards 15189 15201 +0.1% 1.00x
CharIteration_chinese_unicodeScalars 16456 16472 +0.1% 1.00x (?)
CharIteration_chinese_unicodeScalars_Backwards 11509 11514 +0.0% 1.00x (?)
CharIteration_japanese_unicodeScalars 26067 26084 +0.1% 1.00x
CharIteration_japanese_unicodeScalars_Backwards 18179 18180 +0.0% 1.00x (?)
CharIteration_korean_unicodeScalars 21122 21100 -0.1% 1.00x
CharIteration_korean_unicodeScalars_Backwards 14821 14746 -0.5% 1.01x
CharIteration_punctuatedJapanese_unicodeScalars 3888 3886 -0.1% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2757 2771 +0.5% 0.99x
CharIteration_punctuated_unicodeScalars 4885 4883 -0.0% 1.00x (?)
CharIteration_punctuated_unicodeScalars_Backwards 3449 3444 -0.1% 1.00x (?)
CharIteration_russian_unicodeScalars 18123 18132 +0.0% 1.00x (?)
CharIteration_russian_unicodeScalars_Backwards 12678 12658 -0.2% 1.00x (?)
CharIteration_tweet_unicodeScalars 43030 43023 -0.0% 1.00x (?)
CharIteration_tweet_unicodeScalars_Backwards 30059 30092 +0.1% 1.00x (?)
CharIteration_utf16_unicodeScalars 28041 28069 +0.1% 1.00x (?)
CharIteration_utf16_unicodeScalars_Backwards 18593 18582 -0.1% 1.00x (?)
CharacterLiteralsLarge 5942 5882 -1.0% 1.01x (?)
CharacterLiteralsSmall 217 217 +0.0% 1.00x
CharacterPropertiesFetch 4579 4615 +0.8% 0.99x (?)
CharacterPropertiesPrecomputed 1106 1106 +0.0% 1.00x
CharacterPropertiesStashed 1461 1456 -0.3% 1.00x
CharacterPropertiesStashedMemo 1545 1547 +0.1% 1.00x (?)
Chars 1217 1218 +0.1% 1.00x (?)
ClassArrayGetter 15 15 +0.0% 1.00x
Combos 488 488 +0.0% 1.00x
DataAccessBytes 1146 1147 +0.1% 1.00x (?)
DataAppendBytes 4915 4959 +0.9% 0.99x (?)
DataAppendDataLargeToLarge 68543 69513 +1.4% 0.99x (?)
DataAppendDataLargeToMedium 35545 35737 +0.5% 0.99x (?)
DataAppendDataLargeToSmall 34726 34356 -1.1% 1.01x (?)
DataAppendDataMediumToLarge 37834 37939 +0.3% 1.00x (?)
DataAppendDataMediumToMedium 6886 6845 -0.6% 1.01x (?)
DataAppendDataMediumToSmall 6015 5980 -0.6% 1.01x (?)
DataAppendDataSmallToLarge 37507 37850 +0.9% 0.99x (?)
DataAppendDataSmallToMedium 6395 6217 -2.8% 1.03x (?)
DataAppendSequence 7287679 7623700 +4.6% 0.96x (?)
DataCount 34 34 +0.0% 1.00x
DataMutateBytes 3863 3960 +2.5% 0.98x (?)
DataReplaceLarge 37470 36661 -2.2% 1.02x (?)
DataReplaceLargeBuffer 57376 57394 +0.0% 1.00x (?)
DataReplaceMedium 7975 7805 -2.1% 1.02x (?)
DataReplaceMediumBuffer 11786 12048 +2.2% 0.98x (?)
DataReplaceSmall 5795 5773 -0.4% 1.00x (?)
DataReplaceSmallBuffer 8648 8626 -0.3% 1.00x (?)
DataReset 2963 2919 -1.5% 1.02x (?)
DataSetCount 551 563 +2.2% 0.98x (?)
DataSubscript 220 220 +0.0% 1.00x
DictOfArraysToArrayOfDicts 805 789 -2.0% 1.02x (?)
Dictionary 520 521 +0.2% 1.00x (?)
Dictionary2 638 639 +0.2% 1.00x (?)
Dictionary2OfObjects 2075 2077 +0.1% 1.00x (?)
Dictionary3 231 229 -0.9% 1.01x
Dictionary3OfObjects 735 735 +0.0% 1.00x
Dictionary4 340 340 +0.0% 1.00x
Dictionary4Legacy 724 724 +0.0% 1.00x
Dictionary4OfObjects 454 455 +0.2% 1.00x
Dictionary4OfObjectsLegacy 937 937 +0.0% 1.00x
DictionaryBridge 1223 1214 -0.7% 1.01x (?)
DictionaryCopy 107553 106185 -1.3% 1.01x
DictionaryFilter 107230 106966 -0.2% 1.00x (?)
DictionaryGroup 217 215 -0.9% 1.01x
DictionaryGroupOfObjects 2140 2131 -0.4% 1.00x (?)
DictionaryKeysContainsCocoa 39 39 +0.0% 1.00x
DictionaryKeysContainsNative 32 32 +0.0% 1.00x
DictionaryLiteral 1907 1906 -0.1% 1.00x (?)
DictionaryOfObjects 2375 2383 +0.3% 1.00x (?)
DictionaryRemove 4173 4184 +0.3% 1.00x (?)
DictionaryRemoveOfObjects 25919 25957 +0.1% 1.00x (?)
DictionarySubscriptDefaultMutation 265 265 +0.0% 1.00x
DictionarySubscriptDefaultMutationArray 619 619 +0.0% 1.00x
DictionarySubscriptDefaultMutationArrayOfObjects 4024 4048 +0.6% 0.99x (?)
DictionarySubscriptDefaultMutationOfObjects 1728 1725 -0.2% 1.00x (?)
DictionarySwap 1042 1043 +0.1% 1.00x (?)
DictionarySwapAt 6697 6652 -0.7% 1.01x (?)
DictionarySwapAtOfObjects 52534 52315 -0.4% 1.00x (?)
DictionarySwapOfObjects 8849 9002 +1.7% 0.98x
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 84 84 +0.0% 1.00x
DropFirstAnyCollectionLazy 69499 68994 -0.7% 1.01x (?)
DropFirstAnySeqCRangeIter 27147 26997 -0.6% 1.01x
DropFirstAnySeqCRangeIterLazy 27115 27081 -0.1% 1.00x (?)
DropFirstAnySeqCntRange 41 41 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 41 41 +0.0% 1.00x
DropFirstAnySequence 4953 4940 -0.3% 1.00x (?)
DropFirstAnySequenceLazy 4951 4937 -0.3% 1.00x (?)
DropFirstArray 35 35 +0.0% 1.00x
DropFirstArrayLazy 35 35 +0.0% 1.00x
DropFirstCountableRange 35 35 +0.0% 1.00x
DropFirstCountableRangeLazy 35 35 +0.0% 1.00x
DropFirstSequence 2681 2681 +0.0% 1.00x
DropFirstSequenceLazy 2776 2775 -0.0% 1.00x (?)
DropLastAnyCollection 31 31 +0.0% 1.00x
DropLastAnyCollectionLazy 22797 22825 +0.1% 1.00x (?)
DropLastAnySeqCRangeIter 3527 3528 +0.0% 1.00x (?)
DropLastAnySeqCRangeIterLazy 3611 3520 -2.5% 1.03x (?)
DropLastAnySequence 4930 4926 -0.1% 1.00x (?)
DropLastAnySequenceLazy 5022 5027 +0.1% 1.00x (?)
DropLastCountableRange 11 11 +0.0% 1.00x
DropLastCountableRangeLazy 12 12 +0.0% 1.00x
DropLastSequence 664 667 +0.5% 1.00x (?)
DropLastSequenceLazy 666 666 +0.0% 1.00x
DropWhileAnyCollection 107 107 +0.0% 1.00x
DropWhileAnyCollectionLazy 125 125 +0.0% 1.00x
DropWhileAnySeqCRangeIterLazy 125 125 +0.0% 1.00x
DropWhileAnySeqCntRange 50 50 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 125 125 +0.0% 1.00x
DropWhileAnySequence 4838 4841 +0.1% 1.00x (?)
DropWhileAnySequenceLazy 1857 1857 +0.0% 1.00x
DropWhileArrayLazy 88 88 +0.0% 1.00x
DropWhileCountableRange 36 36 +0.0% 1.00x
DropWhileCountableRangeLazy 105 105 +0.0% 1.00x
DropWhileSequence 2224 2225 +0.0% 1.00x (?)
DropWhileSequenceLazy 88 88 +0.0% 1.00x
EqualStringSubstring 50 50 +0.0% 1.00x
EqualSubstringString 49 49 +0.0% 1.00x
EqualSubstringSubstring 49 49 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 49 49 +0.0% 1.00x
ErrorHandling 1180 1188 +0.7% 0.99x
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FatCompactMap 199412 199231 -0.1% 1.00x
FilterEvenUsingReduce 1310 1310 +0.0% 1.00x
FilterEvenUsingReduceInto 147 147 +0.0% 1.00x
FloatingPointPrinting_Double_description_small 23850 23703 -0.6% 1.01x (?)
FloatingPointPrinting_Double_description_uniform 23080 23047 -0.1% 1.00x (?)
FloatingPointPrinting_Double_interpolated 65592 64978 -0.9% 1.01x (?)
FloatingPointPrinting_Float80_description_small 30453 30354 -0.3% 1.00x (?)
FloatingPointPrinting_Float80_description_uniform 29602 29536 -0.2% 1.00x
FloatingPointPrinting_Float80_interpolated 68954 68627 -0.5% 1.00x (?)
FloatingPointPrinting_Float_description_small 5443 5441 -0.0% 1.00x (?)
FloatingPointPrinting_Float_description_uniform 5350 5355 +0.1% 1.00x (?)
FrequenciesUsingReduce 5012 5012 +0.0% 1.00x
FrequenciesUsingReduceInto 1532 1524 -0.5% 1.01x (?)
Hanoi 2164 2168 +0.2% 1.00x (?)
HashTest 961 959 -0.2% 1.00x (?)
Histogram 705 705 +0.0% 1.00x
Integrate 335 334 -0.3% 1.00x
IterateData 1665 1666 +0.1% 1.00x
Join 169 170 +0.6% 0.99x (?)
LazilyFilteredArrayContains 36268 36271 +0.0% 1.00x (?)
LazilyFilteredArrays 66970 64907 -3.1% 1.03x (?)
LazilyFilteredRange 3733 3735 +0.1% 1.00x (?)
LessSubstringSubstring 49 49 +0.0% 1.00x
LessSubstringSubstringGenericComparable 49 49 +0.0% 1.00x
LinkedList 7658 7611 -0.6% 1.01x
LuhnAlgoEager 436 444 +1.8% 0.98x
LuhnAlgoLazy 441 447 +1.4% 0.99x
MapReduce 398 398 +0.0% 1.00x
MapReduceAnyCollection 429 429 +0.0% 1.00x
MapReduceAnyCollectionShort 2233 2232 -0.0% 1.00x (?)
MapReduceClass 3011 3011 +0.0% 1.00x
MapReduceClassShort 4624 4627 +0.1% 1.00x
MapReduceLazyCollection 13 13 +0.0% 1.00x
MapReduceLazyCollectionShort 34 34 +0.0% 1.00x
MapReduceLazySequence 86 86 +0.0% 1.00x
MapReduceSequence 453 453 +0.0% 1.00x
MapReduceShort 1991 1990 -0.1% 1.00x (?)
MapReduceShortString 21 21 +0.0% 1.00x
MapReduceString 48 48 +0.0% 1.00x
Memset 216 219 +1.4% 0.99x (?)
MonteCarloE 10238 10237 -0.0% 1.00x (?)
MonteCarloPi 42783 42777 -0.0% 1.00x (?)
NSError 170 171 +0.6% 0.99x (?)
NSStringConversion 698 699 +0.1% 1.00x
NibbleSort 3670 3669 -0.0% 1.00x (?)
NopDeinit 30232 30190 -0.1% 1.00x
ObjectAllocation 132 133 +0.8% 0.99x (?)
ObjectiveCBridgeFromNSArrayAnyObject 25974 27023 +4.0% 0.96x (?)
ObjectiveCBridgeFromNSSetAnyObject 52145 52232 +0.2% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 65028 66761 +2.7% 0.97x
ObjectiveCBridgeFromNSString 1184 1187 +0.3% 1.00x (?)
ObjectiveCBridgeFromNSStringForced 2702 2693 -0.3% 1.00x (?)
ObjectiveCBridgeStubDataAppend 6249 6396 +2.4% 0.98x (?)
ObjectiveCBridgeStubDateMutation 401 401 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 36172 35953 -0.6% 1.01x (?)
ObjectiveCBridgeStubFromNSDate 7159 7161 +0.0% 1.00x (?)
ObjectiveCBridgeStubFromNSString 1035 1034 -0.1% 1.00x (?)
ObjectiveCBridgeStubFromNSStringRef 161 161 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2579 2648 +2.7% 0.97x (?)
ObjectiveCBridgeStubNSDateMutationRef 13535 13729 +1.4% 0.99x (?)
ObjectiveCBridgeStubToArrayOfNSString 39352 40292 +2.4% 0.98x (?)
ObjectiveCBridgeStubToNSDateRef 3486 3458 -0.8% 1.01x
ObjectiveCBridgeStubToNSString 2386 2382 -0.2% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 116 116 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 290601 294287 +1.3% 0.99x (?)
ObjectiveCBridgeStubURLAppendPathRef 291354 300844 +3.3% 0.97x (?)
ObjectiveCBridgeToNSArray 15402 15292 -0.7% 1.01x (?)
ObjectiveCBridgeToNSDictionary 25806 26824 +3.9% 0.96x (?)
ObjectiveCBridgeToNSSet 17384 17361 -0.1% 1.00x (?)
ObjectiveCBridgeToNSString 486 486 +0.0% 1.00x
ObserverClosure 2156 2199 +2.0% 0.98x (?)
ObserverForwarderStruct 1262 1259 -0.2% 1.00x (?)
ObserverPartiallyAppliedMethod 3722 3713 -0.2% 1.00x (?)
ObserverUnappliedMethod 2526 2553 +1.1% 0.99x (?)
OpaqueConsumingUsers 4183 4182 -0.0% 1.00x (?)
OpenClose 65 65 +0.0% 1.00x
PartialApplyDynamicType 0 0 +0.0% 1.00x
Phonebook 6836 6841 +0.1% 1.00x (?)
PointerArithmetics 31495 31511 +0.1% 1.00x (?)
PolymorphicCalls 25 25 +0.0% 1.00x
PopFrontArray 1985 1987 +0.1% 1.00x (?)
PopFrontArrayGeneric 2014 1975 -1.9% 1.02x (?)
PrefixAnyCollection 84 84 +0.0% 1.00x
PrefixAnyCollectionLazy 68978 68993 +0.0% 1.00x (?)
PrefixAnySeqCRangeIter 20808 20833 +0.1% 1.00x (?)
PrefixAnySeqCRangeIterLazy 20826 20905 +0.4% 1.00x (?)
PrefixAnySeqCntRange 28 28 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 28 28 +0.0% 1.00x
PrefixAnySequence 4336 4333 -0.1% 1.00x (?)
PrefixAnySequenceLazy 4336 4337 +0.0% 1.00x (?)
PrefixArray 35 35 +0.0% 1.00x
PrefixArrayLazy 35 35 +0.0% 1.00x
PrefixCountableRange 35 35 +0.0% 1.00x
PrefixCountableRangeLazy 35 35 +0.0% 1.00x
PrefixSequence 2222 2223 +0.0% 1.00x (?)
PrefixSequenceLazy 2278 2276 -0.1% 1.00x (?)
PrefixWhileAnyCollection 154 154 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 90 90 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 8702 8818 +1.3% 0.99x
PrefixWhileAnySeqCRangeIterLazy 72 72 +0.0% 1.00x
PrefixWhileAnySeqCntRange 60 60 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 90 90 +0.0% 1.00x
PrefixWhileAnySequence 9790 9838 +0.5% 1.00x (?)
PrefixWhileAnySequenceLazy 1393 1392 -0.1% 1.00x
PrefixWhileArray 88 88 +0.0% 1.00x
PrefixWhileArrayLazy 70 70 +0.0% 1.00x
PrefixWhileCountableRange 36 36 +0.0% 1.00x
PrefixWhileCountableRangeLazy 35 35 +0.0% 1.00x
PrefixWhileSequence 364 363 -0.3% 1.00x
PrefixWhileSequenceLazy 52 52 +0.0% 1.00x
Prims 899 905 +0.7% 0.99x (?)
PrimsSplit 914 915 +0.1% 1.00x (?)
QueueConcrete 1147 1149 +0.2% 1.00x (?)
QueueGeneric 1148 1149 +0.1% 1.00x (?)
RC4 166 166 +0.0% 1.00x
RGBHistogram 3221 3240 +0.6% 0.99x (?)
RGBHistogramOfObjects 23781 23704 -0.3% 1.00x (?)
RandomDoubleDef 27891 27857 -0.1% 1.00x (?)
RandomDoubleLCG 4413 4414 +0.0% 1.00x (?)
RandomIntegersDef 25491 25455 -0.1% 1.00x (?)
RandomIntegersLCG 2294 2295 +0.0% 1.00x (?)
RandomShuffleDef 828980 829564 +0.1% 1.00x (?)
RandomShuffleLCG 156095 153820 -1.5% 1.01x (?)
RangeAssignment 337 338 +0.3% 1.00x (?)
RangeIterationSigned 200 200 +0.0% 1.00x
RangeReplaceableCollectionPlusDefault 1012 1012 +0.0% 1.00x
RecursiveOwnedParameter 115 115 +0.0% 1.00x
RemoveWhereFilterInts 46 46 +0.0% 1.00x
RemoveWhereFilterString 251 251 +0.0% 1.00x
RemoveWhereFilterStrings 438 439 +0.2% 1.00x
RemoveWhereMoveInts 15 15 +0.0% 1.00x
RemoveWhereMoveStrings 712 710 -0.3% 1.00x
RemoveWhereQuadraticInts 1296 1298 +0.2% 1.00x (?)
RemoveWhereQuadraticString 385 382 -0.8% 1.01x
RemoveWhereQuadraticStrings 2762 2780 +0.7% 0.99x
RemoveWhereSwapInts 19 19 +0.0% 1.00x
RemoveWhereSwapStrings 862 861 -0.1% 1.00x
ReversedArray 57 57 +0.0% 1.00x
ReversedDictionary 270 271 +0.4% 1.00x (?)
RomanNumbers 82711 82599 -0.1% 1.00x (?)
SequenceAlgosAnySequence 15424 15380 -0.3% 1.00x (?)
SequenceAlgosArray 1579 1580 +0.1% 1.00x (?)
SequenceAlgosContiguousArray 1583 1581 -0.1% 1.00x
SequenceAlgosList 1359 1358 -0.1% 1.00x
SequenceAlgosRange 2578 2578 +0.0% 1.00x
SequenceAlgosUnfoldSequence 1103 1103 +0.0% 1.00x
SetExclusiveOr 5198 5190 -0.2% 1.00x (?)
SetExclusiveOr_OfObjects 11733 11760 +0.2% 1.00x (?)
SetIntersect 699 697 -0.3% 1.00x (?)
SetIntersect_OfObjects 1757 1760 +0.2% 1.00x (?)
SetIsSubsetOf 355 354 -0.3% 1.00x
SetIsSubsetOf_OfObjects 454 454 +0.0% 1.00x
SetUnion 4432 4440 +0.2% 1.00x (?)
SetUnion_OfObjects 10108 10130 +0.2% 1.00x (?)
SevenBoom 872 878 +0.7% 0.99x (?)
Sim2DArray 599 599 +0.0% 1.00x
SortLargeExistentials 5477 5473 -0.1% 1.00x (?)
SortLettersInPlace 989 991 +0.2% 1.00x (?)
SortSortedStrings 868 870 +0.2% 1.00x
SortStrings 1777 1777 +0.0% 1.00x
SortStringsUnicode 2614 2612 -0.1% 1.00x (?)
StackPromo 24770 24725 -0.2% 1.00x (?)
StaticArray 10 10 +0.0% 1.00x
StrComplexWalk 1776 1776 +0.0% 1.00x
StrToInt 3193 3187 -0.2% 1.00x (?)
StringAdder 577 577 +0.0% 1.00x
StringBuilder 559 559 +0.0% 1.00x
StringBuilderSmallReservingCapacity 579 579 +0.0% 1.00x
StringComparison_abnormal 780 785 +0.6% 0.99x
StringComparison_ascii 1034 1034 +0.0% 1.00x
StringComparison_emoji 829 828 -0.1% 1.00x (?)
StringComparison_fastPrenormal 877 877 +0.0% 1.00x
StringComparison_latin1 687 687 +0.0% 1.00x
StringComparison_longSharedPrefix 960 959 -0.1% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 1615 1613 -0.1% 1.00x (?)
StringComparison_slowerPrenormal 1718 1719 +0.1% 1.00x (?)
StringComparison_zalgo 127194 126535 -0.5% 1.01x (?)
StringEdits 184806 178807 -3.2% 1.03x
StringEnumRawValueInitialization 856 854 -0.2% 1.00x
StringEqualPointerComparison 304 305 +0.3% 1.00x
StringFromLongWholeSubstring 22 22 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 21 21 +0.0% 1.00x
StringHasPrefixAscii 2233 2234 +0.0% 1.00x (?)
StringHasPrefixUnicode 101605 101535 -0.1% 1.00x (?)
StringHasSuffixAscii 2320 2319 -0.0% 1.00x
StringHasSuffixUnicode 101046 100987 -0.1% 1.00x (?)
StringInterpolation 9681 9799 +1.2% 0.99x (?)
StringInterpolationManySmallSegments 18753 19056 +1.6% 0.98x (?)
StringInterpolationSmall 4257 4254 -0.1% 1.00x (?)
StringMatch 12869 12864 -0.0% 1.00x (?)
StringRemoveDupes 498 500 +0.4% 1.00x
StringUTF16Builder 2706 2690 -0.6% 1.01x (?)
StringUTF16SubstringBuilder 5976 5958 -0.3% 1.00x (?)
StringWalk 1437 1438 +0.1% 1.00x
StringWithCString 44938 44935 -0.0% 1.00x (?)
StringWordBuilder 2254 2248 -0.3% 1.00x (?)
StringWordBuilderReservingCapacity 1836 1832 -0.2% 1.00x (?)
SubstringComparable 13 13 +0.0% 1.00x
SubstringEqualString 615 612 -0.5% 1.00x (?)
SubstringEquatable 1407 1408 +0.1% 1.00x (?)
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 74 74 +0.0% 1.00x
SuffixAnyCollection 31 31 +0.0% 1.00x
SuffixAnyCollectionLazy 24017 23037 -4.1% 1.04x
SuffixAnySeqCRangeIter 3758 3761 +0.1% 1.00x (?)
SuffixAnySeqCRangeIterLazy 3755 3758 +0.1% 1.00x (?)
SuffixAnySeqCntRange 21 20 -4.8% 1.05x
SuffixAnySeqCntRangeLazy 21 21 +0.0% 1.00x
SuffixAnySequence 4916 4916 +0.0% 1.00x
SuffixAnySequenceLazy 5007 5016 +0.2% 1.00x (?)
SuffixCountableRange 11 11 +0.0% 1.00x
SuffixCountableRangeLazy 12 12 +0.0% 1.00x
SuffixSequence 3647 3648 +0.0% 1.00x (?)
SuffixSequenceLazy 3648 3648 +0.0% 1.00x
SumUsingReduce 102 102 +0.0% 1.00x
SumUsingReduceInto 97 97 +0.0% 1.00x
SuperChars 15508 15561 +0.3% 1.00x (?)
TwoSum 1494 1487 -0.5% 1.00x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 298 298 +0.0% 1.00x
Walsh 432 431 -0.2% 1.00x (?)
WordCountHistogramASCII 8081 8068 -0.2% 1.00x
WordCountHistogramUTF16 15076 15160 +0.6% 0.99x (?)
WordCountUniqueASCII 2110 2096 -0.7% 1.01x (?)
WordCountUniqueUTF16 8238 8147 -1.1% 1.01x
WordSplitASCII 6818 6840 +0.3% 1.00x (?)
WordSplitUTF16 8829 8909 +0.9% 0.99x (?)
XorLoop 402 401 -0.2% 1.00x (?)
Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

return archetype->requiresClass();
// A base class constraint that isn't NSError rules out the archetype being
// bound to NSError.
if (M.getASTContext().LangOpts.EnableObjCInterop) {
Copy link
Contributor

Choose a reason for hiding this comment

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

every other change here seems to be about removing such calls, why does this remain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've been introducing the minimum change that supports the subset we need in s-c-f by elimination. A follow-up will be to add tests, and revisit paths here if we find corner cases that I missed.

@eeckstein
Copy link
Contributor

I am at this point really inclined to investigate these as a follow-up; is that ok with you?

Fine with me

@millenomi
Copy link
Contributor Author

@millenomi
Copy link
Contributor Author

Simultaneous merging with swiftlang/swift-corelibs-foundation#1526 imminent…

@millenomi millenomi merged commit 63348bc into swiftlang:master May 31, 2018
@millenomi
Copy link
Contributor Author

Standing by for CI now.

@millenomi millenomi deleted the LinuxAsBridging_2 branch May 31, 2018 16:33
@millenomi
Copy link
Contributor Author

@benlangmuir FYI, this has been merged; standing by for CI.

millenomi added a commit to millenomi/swift that referenced this pull request May 31, 2018
Turn on 'as' bridging for Linux (2)

(cherry picked from commit 63348bc)
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.

8 participants