[Pitch] Elide `some` in Swift 6

I'm not sure I see what you are referring to. "Constructor arguments in the toolchain" ?

I'm seeing a new error from time to time:

/Users/johnholdsworth/Developer/GRDB.swift/GRDB/Core/FetchRequest.swift:227:28: error: 'some' types are only permitted in properties, subscripts, and functions
    public init(_ request: some FetchRequest<RowDecoder>) {
                           ^

But I'm seeing that also for some functions so it could just be a regression somewhere.

/Users/johnholdsworth/Developer/GRDB.swift/GRDB/QueryInterface/SQLInterpolation+QueryInterface.swift:9:56: error: 'some' types are only permitted in properties, subscripts, and functions
    public mutating func appendInterpolation(_ table: (some TableRecord).Type) {

Building off main always a bit of a mixed bag and your project has some very interesting edge cases. Are you in the source compatibility suite?

All the quoted snippets compile today (Swift 5.7).

1 Like

Strong +1 from me, FWIW. I think that it makes the language easier to teach and learn. You only introduce any when you need its dynamic nature (and the indirection cost associated with it). APIs are more approachable, because they have less syntax noise. The sooner we tear off the bandaid, the better.

4 Likes

Imo it is a misconception that those indirection costs are important, and I oppose the notion that some is somehow better than any. In the majority of cases, the cost advantage does not matter at all, so this is pushing towards premature optimization.
Although premature optimization is not always evil, any saves its users from trouble down the road, as many things simply work. Not sure if it still applies, but take Closures cannot use the `some` keyword? as an example.

I don't think a new default would make anything simpler to understand either, but this standpoint has been explained already.

2 Likes

Those costs are important; it is not a misconception. However, what is more important is to use the right tool for the right job - each can offer performance and expressivity benefits depending on the circumstance.

For example, an any Collection<Int> could be backed by an Array, Range<Int>, or RangeSet<Int>, depending on the data it happens to contain as discovered at runtime. It is difficult to express that kind of dynamism using generics. However, generics allow for greater compile-time optimisation, and the guarantee of having a single underlying type means that it is easier to reason about that type's associated types.

That said, the kind of dynamism which existentials excel at is actually rather rare in real applications. Generics are the more useful mechanism for type abstraction.

3 Likes

It it feasible to make these statements more concrete, i.e., by providing contrasting code examples where the relative difficulty/ease is clear to see?

Sure. But I've collapsed it so as not to distract from the topic at hand.

Dynamism

// We have a type Foo, containing some integers.
// We want to optimise the storage of those integers so contiguous regions
// are represented using Range<Int>.
//
struct Foo {
  var data: ???

  init(rawData: [Int]) {
    let rawData = ...
    if let range = makeRangeIfPossible(rawData) {
      self.data = range
    } else {
      self.data = rawData
    }
  }
}

This kind of pattern requires data to be an existential, because we want Foo to remain a single type while also containing data stored using one of multiple representations.

An alternative might be to make Foo generic (e.g. Foo<Storage>, with data being of type Storage), but that becomes extremely awkward, because code outside of Foo won't know whether a certain data set should result in a Foo<Array<Int>> or Foo<Range<Int>>.

In a broader sense, existentials allow type abstraction to be used internally by Foo as an implementation detail, without affecting Foo's external interface.

Associated Types

struct Bar<Container> where Container: MutableCollection {
  var container: Container

  mutating func someMutation() { ... }

  mutating func doSomethingElse() {

    let i: Container.Index = container.startIndex

    someMutation()

    // Because 'Container' is generic, we know that 'someMutation()'
    // could not have changed the type of 'container'.
    // In other words, 'i', and 'container.endIndex' still definitely 
    // refer to the same type.
    while i < container.endIndex {
      ...
    }
  }
}

If container were an existential, it is possible that someMutation() would change its underlying type, meaning that i and container.endIndex after the call refer to different types. Generics pin the type so it cannot change, while still keeping it abstract.

3 Likes

I don't think that this kind of pattern requires an existential at all. IMHO, most of the times someone reaches for an existential for something like that, it would be much better written like this:

struct Foo {
    private enum Storage {
        case range(Range<Int>)
        case array([Int])

        init(rawData: [Int]) {
            if let range = makeRangeIfPossible(rawData) {
                self = .range(range)
            } else {
                self = .array(rawData)
            }
        }
    }

    private var data: Storage

    init(rawData: [Int]) {
        self.data = .init(rawData: rawData)
    }
}
4 Likes

We're getting away from the topic, but briefly: I disagree that an enum is necessarily "better". In this context, the only meaningful commonality between Array and Range is that they are both collections.

If you put these types in an enum, you will have to forward the conformances manually. I would argue that is not just a matter of the language being unhelpful and making us write tedious boilerplate, and actually makes complete sense: in general, different cases are semantically meaningful; it would be wrong to say that every enum with 2 collection payloads should conform to collection.

So this is something of an exceptional case, where there is no semantic meaning to the 2 cases, and the only thing that is meaningful is that there is a collection underneath - in other words, I think any Collection is the best expression of intent, and that these sorts of enums are basically hand-rolled existentials.

To emphasise that point, when we use one of the language's existentials, we do get automatic conformance forwarding, unboxing, and other nice features, automatically as part of the language, because we are precisely expressing that the collection conformance is all we care about.

Now, it may be that constraining the list of underlying types can lead to more efficient existential layout and dispatching, but I would also argue that is something that should be addressed by optimisation attributes (similar to @inlinable or @frozen). In other words, I think that if it is beneficial to manually write out an existential using an enum, we should consider that a defect and address it.

5 Likes

While that's true, enums have significantly better performance characteristics than existentials, which can make the boilerplate worth it a lot of the time, especially if this is in a library that might get used by a wide variety of clients.

3 Likes

there's an exception to this: if you have an existential that's constrained to AnyObject, those have better performance than an enum of classes, since you are already paying for indirection.

i wouldn't want to use existentials to wrap any trivial value types or mid-size and above struct types though. the boilerplate needed to reinvent protocol dispatch is exhausting and i often feel like i have no choice but to endlessly switch over enums of struct types.

1 Like

I've been benchmarking the performance of existentials using this script. The TL;DR is, existentials are less fast (sometimes dramatically so when the compiler starts cheating!) but they are fast enough to not be something you need to give too much attention to.

% swift -O ~/overhead.swift
class underlier  <- calls/sec for argument type ->
let storage  existential     generic         opaque
existential  178,456,720.78  488,280,374.15  485,837,035.14
opaque       226,465,126.95  5,324,748,000.  5,342,041,648.
concrete     228,034,958.47  5,816,939,185.  5,806,872,490.

class underlier  <- calls/sec for argument type ->
var storage  existential     generic         opaque
existential  186,295,937.67  489,117,401.82  489,548,420.22
opaque       226,280,029.56  5,807,274,489.  5,813,714,048.
concrete     223,463,810.97  5,574,196,292.  5,549,122,180.

class underlier  <- calls/sec for inout argument type ->
var storage  existential     generic         opaque
existential  486,928,417.19  487,519,861.44  486,003,105.37
opaque                       5,605,110,249.  5,653,081,744.
concrete                     5,687,963,113.  5,814,116,994.

struct underlier <- calls/sec for inout argument type ->
var storage  existential     generic         opaque
existential  285,566,717.61  5,513,017,875.  5,367,678,525.
opaque                       54,050,309,278  58,784,919,411
concrete                     59,158,025,387  59,535,897,799

This is from an M1 mini. I'd be interested to see the numbers from someone who has an M2.
Numbers for an iPhone SE with some weird differences:

class underlier  <- calls/sec for argument type ->
let storage  existential     generic         opaque
existential  391,604,912.91  442,537,495.31  443,047,021.48
opaque       4,330,945,325.  4,359,077,114.  4,334,749,896.
concrete     4,531,198,617.  4,524,843,842.  4,533,157,524.

class underlier  <- calls/sec for argument type ->
var storage  existential     generic         opaque
existential  138,385,455.07  139,014,276.6   138,946,810.48
opaque       4,591,465,790.  4,595,490,303.  4,595,490,303.
concrete     4,599,774,085.  4,574,439,960.  4,627,431,597.

class underlier  <- calls/sec for inout argument type ->
var storage  existential     generic         opaque
existential  442,595,867.71  439,599,211.83  439,541,627.15
opaque                       4,597,757,193.  4,606,341,222.
concrete                     4,602,045,205.  4,602,045,205.

struct underlier <- calls/sec for inout argument type ->
var storage  existential     generic         opaque
existential  227,863,378.80  239,268,441.55  239,228,182.84
opaque                       53,193,455,928  53,193,455,928
concrete                     53,193,455,928  52,363,345,817

Numbers from inside Xcode as opposed to using the script show these differences.

3rd EDIT
It's even weirder than that. Inside Xcode, if you insert the test code into a macOS app you get the script's performance pattern! How could performance be platform specific? Running it inside the iOS simulator gives the second pattern.

4th EDIT
It turns out, most of the differences between compiling for iPhone and running the script I posted on the command line disappear if you compile for "Whole Module Optimisation".

1 Like

You may get slightly strange results getting tricked by the optimiser as your results look a bit wild, I was curious and just quickly refactored your test slightly here and used a blackHole: external-reproducers/benchmarks/elide-some at main Β· ordo-one/external-reproducers Β· GitHub
(reservations for any translation errors)

If you want to give it a spin:

git clone git@github.com:ordo-one/external-reproducers
cd external-reproducers/benchmarks/elide-some/
swift package benchmark --metric wallClock --grouping metric

Use --filter regex as in the other examples below if you want to run a certain subset for more easy comparison etc, see examples below.

Output for me (M1 Max):

Summary
Time (wall clock)
╒═════════════════════════════════════════════════════════╀═════════╀═════════╀═════════╀═════════╀═════════╀═════════╀═════════╀═════════╕
β”‚ Test                                                    β”‚      p0 β”‚     p25 β”‚     p50 β”‚     p75 β”‚     p90 β”‚     p99 β”‚    p100 β”‚ Samples β”‚
β•žβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════║
β”‚ ElideSome:letAnyStorageWithConcrete (ΞΌs)                β”‚    9601 β”‚    9633 β”‚    9666 β”‚    9748 β”‚    9814 β”‚   10010 β”‚   10067 β”‚     310 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:letAnyStorageWithExistential (ΞΌs)             β”‚    8978 β”‚    9011 β”‚    9035 β”‚    9084 β”‚    9142 β”‚    9306 β”‚    9486 β”‚     332 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:letAnyStorageWithGeneric (ΞΌs)                 β”‚    9912 β”‚    9936 β”‚    9953 β”‚   10002 β”‚   10067 β”‚   10297 β”‚   10469 β”‚     301 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:letConcreteStorageWithConcrete (ΞΌs)           β”‚    7434 β”‚    7454 β”‚    7479 β”‚    7540 β”‚    7589 β”‚    7725 β”‚    7782 β”‚     400 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:letConcreteStorageWithExistential (ΞΌs)        β”‚   10534 β”‚   10559 β”‚   10584 β”‚   10633 β”‚   10764 β”‚   11059 β”‚   11231 β”‚     283 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:letConcreteStorageWithGeneric (ΞΌs)            β”‚    7434 β”‚    7446 β”‚    7467 β”‚    7516 β”‚    7581 β”‚    7774 β”‚    8609 β”‚     401 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:letSomeStorageWithConcrete (ΞΌs)               β”‚    7434 β”‚    7499 β”‚    7548 β”‚    7602 β”‚    7675 β”‚    7835 β”‚    7925 β”‚     397 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:letSomeStorageWithExistential (ΞΌs)            β”‚   10543 β”‚   10657 β”‚   10723 β”‚   10797 β”‚   10911 β”‚   11116 β”‚   11223 β”‚     280 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:letSomeStorageWithGeneric (ΞΌs)                β”‚    7434 β”‚    7487 β”‚    7540 β”‚    7593 β”‚    7667 β”‚    7876 β”‚    7905 β”‚     398 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varAnyStorageWithConcrete (ΞΌs)                β”‚   13942 β”‚   13983 β”‚   14024 β”‚   14098 β”‚   14229 β”‚   14475 β”‚   14532 β”‚     214 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varAnyStorageWithExistential (ΞΌs)             β”‚   13942 β”‚   13975 β”‚   14000 β”‚   14073 β”‚   14229 β”‚   14458 β”‚   14893 β”‚     214 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varAnyStorageWithGeneric (ΞΌs)                 β”‚   14254 β”‚   14286 β”‚   14303 β”‚   14368 β”‚   14540 β”‚   14802 β”‚   15114 β”‚     209 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varAnyStorageWithInoutConcrete (ΞΌs)           β”‚   10223 β”‚   10313 β”‚   10362 β”‚   10412 β”‚   10477 β”‚   10682 β”‚   10797 β”‚     290 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varAnyStorageWithInoutExistential (ΞΌs)        β”‚    9601 β”‚    9633 β”‚    9658 β”‚    9699 β”‚    9789 β”‚   10002 β”‚   10059 β”‚     310 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varAnyStorageWithInoutGeneric (ΞΌs)            β”‚   10534 β”‚   10575 β”‚   10641 β”‚   10698 β”‚   10764 β”‚   10993 β”‚   11083 β”‚     282 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varAnyStructStorageWithInoutConcrete (ΞΌs)     β”‚    4333 β”‚    4345 β”‚    4358 β”‚    4386 β”‚    4448 β”‚    4599 β”‚    5509 β”‚     685 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varAnyStructStorageWithInoutExistential (ΞΌs)  β”‚    3717 β”‚    3731 β”‚    3749 β”‚    3790 β”‚    3833 β”‚    3923 β”‚    3966 β”‚     797 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varAnyStructStorageWithInoutGeneric (ΞΌs)      β”‚    4644 β”‚    4669 β”‚    4702 β”‚    4751 β”‚    4816 β”‚    4939 β”‚    5119 β”‚     636 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varConcreteStorageWithConcrete (ΞΌs)           β”‚   10534 β”‚   10575 β”‚   10616 β”‚   10674 β”‚   10715 β”‚   10928 β”‚   11223 β”‚     283 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varConcreteStorageWithExistential (ΞΌs)        β”‚   10534 β”‚   10559 β”‚   10584 β”‚   10641 β”‚   10706 β”‚   10977 β”‚   11034 β”‚     283 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varConcreteStorageWithGeneric (ΞΌs)            β”‚   10534 β”‚   10567 β”‚   10592 β”‚   10657 β”‚   10731 β”‚   10928 β”‚   10977 β”‚     283 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varConcreteStorageWithInoutConcrete (ΞΌs)      β”‚    8052 β”‚    8077 β”‚    8110 β”‚    8163 β”‚    8200 β”‚    8396 β”‚    8503 β”‚     369 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varConcreteStorageWithInoutGeneric (ΞΌs)       β”‚    8052 β”‚    8122 β”‚    8155 β”‚    8183 β”‚    8257 β”‚    8421 β”‚    8454 β”‚     368 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varConcreteStructStorageWithInoutConcrete (μ… β”‚     309 β”‚     310 β”‚     310 β”‚     314 β”‚     323 β”‚     347 β”‚     540 β”‚    9539 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varConcreteStructStorageWithInoutGeneric (ΞΌs) β”‚     309 β”‚     310 β”‚     310 β”‚     312 β”‚     322 β”‚     351 β”‚     402 β”‚    9551 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varSomeStorageWithConcrete (ΞΌs)               β”‚   10534 β”‚   10551 β”‚   10575 β”‚   10641 β”‚   10731 β”‚   11001 β”‚   11034 β”‚     283 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varSomeStorageWithExistential (ΞΌs)            β”‚   10534 β”‚   10567 β”‚   10600 β”‚   10674 β”‚   10780 β”‚   10911 β”‚   10993 β”‚     283 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varSomeStorageWithGeneric (ΞΌs)                β”‚   10534 β”‚   10551 β”‚   10575 β”‚   10616 β”‚   10706 β”‚   10919 β”‚   11157 β”‚     283 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varSomeStorageWithInoutConcrete (ΞΌs)          β”‚    8052 β”‚    8110 β”‚    8175 β”‚    8232 β”‚    8318 β”‚    8421 β”‚    8437 β”‚     367 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varSomeStorageWithInoutGeneric (ΞΌs)           β”‚    8052 β”‚    8110 β”‚    8159 β”‚    8208 β”‚    8265 β”‚    8413 β”‚    8544 β”‚     368 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varSomeStructStorageWithInoutConcrete (ΞΌs)    β”‚     309 β”‚     310 β”‚     310 β”‚     314 β”‚     323 β”‚     348 β”‚     429 β”‚    9535 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varSomeStructStorageWithInoutGeneric (ΞΌs)     β”‚     309 β”‚     310 β”‚     310 β”‚     312 β”‚     318 β”‚     334 β”‚     415 β”‚    9596 β”‚
β•˜β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•›

In general I disagree with the fast enough sentiment, for example the letSomeStorage case has significant differences:

Summary
swift package benchmark --metric wallClock --grouping metric --filter "letSomeStorage.*"
...
Time (wall clock)
╒═════════════════════════════════════════════╀═════════╀═════════╀═════════╀═════════╀═════════╀═════════╀═════════╀═════════╕
β”‚ Test                                        β”‚      p0 β”‚     p25 β”‚     p50 β”‚     p75 β”‚     p90 β”‚     p99 β”‚    p100 β”‚ Samples β”‚
β•žβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════║
β”‚ ElideSome:letSomeStorageWithConcrete (ΞΌs)   β”‚    7434 β”‚    7454 β”‚    7471 β”‚    7495 β”‚    7553 β”‚    7905 β”‚    8355 β”‚     401 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:letSomeStorageWithExistential (μ… β”‚   10534 β”‚   10567 β”‚   10584 β”‚   10625 β”‚   10739 β”‚   11157 β”‚   11395 β”‚     283 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:letSomeStorageWithGeneric (ΞΌs)    β”‚    7434 β”‚    7458 β”‚    7475 β”‚    7507 β”‚    7684 β”‚    7995 β”‚    9355 β”‚     399 β”‚
β•˜β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•›

Also in terms of ARC traffic:

Summary
swift package benchmark --metric retainCount --grouping metric --filter "letSomeStorage.*"

Retains
╒═════════════════════════════════════════════╀═════════╀═════════╀═════════╀═════════╀═════════╀═════════╀═════════╀═════════╕
β”‚ Test                                        β”‚      p0 β”‚     p25 β”‚     p50 β”‚     p75 β”‚     p90 β”‚     p99 β”‚    p100 β”‚ Samples β”‚
β•žβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════║
β”‚ ElideSome:letSomeStorageWithConcrete        β”‚       1 β”‚       1 β”‚       1 β”‚       1 β”‚       1 β”‚       1 β”‚       1 β”‚     398 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:letSomeStorageWithExistential (K) β”‚     999 β”‚    1000 β”‚    1000 β”‚    1000 β”‚    1000 β”‚    1000 β”‚    1000 β”‚      90 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:letSomeStorageWithGeneric         β”‚       1 β”‚       1 β”‚       1 β”‚       1 β”‚       1 β”‚       1 β”‚       1 β”‚     399 β”‚
β•˜β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•›

That being said, there are some quite surprising results too (which might be worth digging into), e.g.:

Summary
swift package benchmark --metric wallClock --grouping metric --filter "varAnyStruct.*"

Time (wall clock)
╒═══════════════════════════════════════════════════════╀═════════╀═════════╀═════════╀═════════╀═════════╀═════════╀═════════╀═════════╕
β”‚ Test                                                  β”‚      p0 β”‚     p25 β”‚     p50 β”‚     p75 β”‚     p90 β”‚     p99 β”‚    p100 β”‚ Samples β”‚
β•žβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════β•ͺ═════════║
β”‚ ElideSome:varAnyStructStorageWithInoutConcrete (ΞΌs)   β”‚    4333 β”‚    4354 β”‚    4370 β”‚    4399 β”‚    4472 β”‚    4775 β”‚    4976 β”‚     683 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varAnyStructStorageWithInoutExistential (μ… β”‚    3717 β”‚    3731 β”‚    3756 β”‚    3803 β”‚    3846 β”‚    4126 β”‚    4268 β”‚     794 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ElideSome:varAnyStructStorageWithInoutGeneric (ΞΌs)    β”‚    4644 β”‚    4669 β”‚    4689 β”‚    4739 β”‚    4784 β”‚    4988 β”‚    5296 β”‚     637 β”‚
β•˜β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•›
1 Like

I can't deny the results I processed are pretty wild and surprising in many ways; Optimisers move in mysterious ways for sure. If I understand "using a blackhole" turns off the optimiser and inlining. Surely it's what the optimiser does that counts though for a Release build? Looking at the assembly in some cases it is replacing the ten dispatches to the incrementing method with a single instruction adding 10 to the count in the underling type. I'm assuming this is what happens when you get 5 billion increments a second. I have no idea what it is doing for the 50 billion-odd increments per second recorded for structs.

Taking a step back to the fast enough debate, the worst case seems to hover around 150 million dispatches a second though it could be less in certain cases I've not been able to contrive. I can't imagine a program that would need to do that and if it did move the inner loop inside the function call.

These tests are only showing the overhead of the existential call but the larger impact most of the times is that the optimizer cannot look through the existential and therefor cannot specialize code.

This is really noticeable when there are more generics β€žhiddenβ€œ behind the existential. @hassila tests are exercising this already more but it gets worse the more generic code the optimizer can’t specialize

4 Likes

@taylorswift has a lot of experience with this, but IIRC the optimizer also has difficulty specializing through generics.

2 Likes

That’s an excellent point.

Also, just o be clear, it’s not really β€œmy” tests, I just adopted @johnno1962 tests to try to get some less wild measurements as I was curious. (Some of the results are a bit surprising!)

blackholes are completely orthogonal to inlining, and they don't turn off the optimizer, they merely simulate a cross-module function call. one of the reasons inlining can backfire is by turning one blackhole invocation into several constituent blackhole invocations.

usually the purpose of inlining is to make APIs immune to the cross-module function call problem, if something is not @inlinable it is already a black hole from the perspective of the caller. we generally do not want to make everything @inlinable, which is why blackhole testing is valuable.

3 Likes

Additionally, blackhole testing prevents the optimizer from observing that a computation is entirely unnecessary and optimizing it away altogether.

1 Like