[swift-dev] Question about size of Character type

2016-08-19 Thread Ole Begemann via swift-dev
The Character type is essentially defined like this [1]: struct Character { enum Representation { // A _StringBuffer whose first grapheme cluster is self. // NOTE: may be more than 1 Character long. case large(_StringBuffer._Storage) case small(Builtin.Int63)

Re: [swift-dev] Question about size of Character type

2016-08-19 Thread Ole Begemann via swift-dev
; RawPointer, but we should be able to pick some up either from alignment or > from ABI knowledge. > > Jordan > >> On Aug 19, 2016, at 13:30, Ole Begemann via swift-dev > <mailto:swift-dev@swift.org>> wrote: >> >> The Character type is essent

[swift-dev] Xcode 8 GM: Compiler segfaults on ExpressibleByArrayLiteral

2016-09-08 Thread Ole Begemann via swift-dev
I'm seeing a segmentation fault when compiling this code with Xcode 8 GM: ``` // stack.swift struct Stack { var elements: [Element] = [] } extension Stack: ExpressibleByArrayLiteral { init(arrayLiteral elements: Element...) { self.elements = elements } } ``` --- This is my

Re: [swift-dev] Xcode 8 GM: Compiler segfaults on ExpressibleByArrayLiteral

2016-09-08 Thread Ole Begemann via swift-dev
FWIW, it’s actually fixed in master (probably due to Slava’s recent work on the generics system). The primary benefit to filing a radar at this point is that you’ll get notified when the fix makes it into an Xcode release. Thanks. I'll just wait then. :-) _

Re: [swift-dev] Dictionary Collision Resolution Guarantees

2016-10-14 Thread Ole Begemann via swift-dev
On 14/10/2016 02:46, Dave Abrahams wrote: OK cool, is there any reason it’s even written down? I don’t see any code that’s obviously relying on it. (seems fine to delete it?) It's written down because we've never formalized our index invalidation rules. I didn't realize that this comment was

Re: [swift-dev] Implementation of Existential Collection (AnySequence and co.)

2017-04-05 Thread Ole Begemann via swift-dev
On 05.04.2017 00:33, Pavol Vaskovic via swift-dev wrote: Hello, I’ve been familiarizing myself with the implementation details of the `AnySequence` and related types, because I’ve encountered strange performance behavior when using them. I have a few questions as a result. I might also hold i

Re: [swift-dev] Implementation of Existential Collection (AnySequence and co.)

2017-04-05 Thread Ole Begemann via swift-dev
On 05.04.2017 15:22, Pavol Vaskovic via swift-dev wrote: On Wednesday, 5 April 2017 at 14:56, Pavol Vaskovic wrote: Thanks Ole! This explanation of type erasure makes total sense. I have overlooked they are generic over different axis. But I think I have confirmed the performance implication

Re: [swift-dev] State of String: ABI & Performance

2018-01-11 Thread Ole Begemann via swift-dev
> On 11. Jan 2018, at 06:36, Chris Lattner via swift-dev > wrote: > > On Jan 10, 2018, at 11:55 AM, Michael Ilseman via swift-dev > mailto:swift-dev@swift.org>> wrote: >> (A gist-formatted version of this email can be found at >> https://gist.github.com/milseman/bb39ef7f170641ae52c13600a51278