profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/tkremenek/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

apple/swift-format 1246

Formatting technology for Swift source code

tkremenek/swift 5

The Swift Programming Language

tkremenek/swift-corelibs-foundation 1

The Foundation Project, providing core utilities, internationalization, and OS independence

tkremenek/swift-package-manager 1

The Package Manager for the Swift Programming Language

tkremenek/rouge 0

A pure Ruby code highlighter that is compatible with Pygments

tkremenek/swift-corelibs-xctest 0

The XCTest Project, A Swift core library for providing unit test support

tkremenek/swift-lldb 0

This is the version of LLDB that supports the Swift programming language & REPL.

tkremenek/swift-source-compat-suite 0

The infrastructure and project index comprising the Swift source compatibility suite.

pull request commentapple/swift-collections

Add a priority queue implementation built on top of a min-max heap

I just spent a little time profiling a bit (as the benchmark runtime seems quite long compared to the C++ version referenced in the article linked to previously), there seems to be an issue with using swapAt: (probably the same issue discussed here) - I just did a simple measurement of PriorityQueue<Int> insert and could see around 7.5M transient allocations. Doing the simple change of manually doing the swapAt: like this in all places:

storage.swapAt(largestDescendantIdx, index)

changed to

let tmp = storage[index]
storage[index] = storage[largestDescendantIdx]
storage[largestDescendantIdx] = tmp

brought this test down to 165K transient allocations and the runtime was basically halved.

And the original benchmark went from: chart-old

to:

chart-new

Not sure if this is a known issue with the swapAt: method, but it seems a bit rough to force two memory allocations per swapAt: operation for a simple small value type.

Also, looking at the removeMax test, there is also a large amount of transient allocations with this backtrace, can't quite understand why though (haven't looked at any others yet).

image

AquaGeek

comment created time in an hour

created tagapple/swift-tools-support-core

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-06-13-a

Contains common infrastructural code for both SwiftPM and llbuild.

created time in 2 hours

created tagapple/swift-syntax

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-06-13-a

SwiftPM package for SwiftSyntax library.

created time in 2 hours

created tagapple/swift-xcode-playground-support

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-06-13-a

Logging and communication to allow Swift toolchains to communicate with Xcode.

created time in 2 hours

created tagapple/swift-integration-tests

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-06-13-a

Automated tests for validating the generated Swift snapshots behave correctly

created time in 2 hours

created tagapple/swift-corelibs-libdispatch

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-06-13-a

The libdispatch Project, (a.k.a. Grand Central Dispatch), for concurrency on multicore hardware

created time in 2 hours

created tagapple/swift-corelibs-xctest

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-06-13-a

The XCTest Project, A Swift core library for providing unit test support

created time in 2 hours

push eventapple/swift-syntax

Kim de Vos

commit sha 58fa415d4da93de9b802b80c031034f0cee47fc0

Add convenience initializers for more nodes

view details

Alex Hoppen

commit sha 6d5968e73996f394ce6a04363cb58477ff84a41a

Merge pull request #288 from kimdv/kimdv/add-convenience-inits-pt-2 Add convenience initializers for simple expr values

view details

push time in 12 hours

PR merged apple/swift-syntax

Add convenience initializers for simple expr values

I have tried to make some initializers for the types I thought would be helpfull.

I could also try to generate all Expr that have a Keyword in the init parameter like NilLiteralExpr

Something like

extension NilLiteralExpr {
    public init(
        nilKeyword: TokenSyntax = Tokens.nil
    ) {
        self.init(nilKeyword: nilKeyword)
    }
}
+837 -250

6 comments

11 changed files

kimdv

pr closed time in 12 hours

pull request commentapple/swift-evolution

SE-0258: property wrappers, revise the Atomic example.

@atrick I agree; I don’t think this has any practical benefit, but it has at least a couple deadly problems.

This pattern is actively harmful for addressing race conditions. At the time this SE was reviewed, there simply wasn't any reasonable alternative. The most helpful thing would be to remove the example and add John's language to the revisions section to document the issue along with a link to the swift-atomics package. None of this is a necessary part of the property wrapper proposal, but given that the pattern was introduced here it's the best place to document the problem.

atrick

comment created time in 18 hours

created tagapple/swift-tools-support-core

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-06-12-a

Contains common infrastructural code for both SwiftPM and llbuild.

created time in a day

created tagapple/swift-syntax

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-06-12-a

SwiftPM package for SwiftSyntax library.

created time in a day

created tagapple/swift-xcode-playground-support

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-06-12-a

Logging and communication to allow Swift toolchains to communicate with Xcode.

created time in a day

created tagapple/swift-integration-tests

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-06-12-a

Automated tests for validating the generated Swift snapshots behave correctly

created time in a day

created tagapple/swift-corelibs-libdispatch

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-06-12-a

The libdispatch Project, (a.k.a. Grand Central Dispatch), for concurrency on multicore hardware

created time in a day

created tagapple/swift-corelibs-xctest

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-06-12-a

The XCTest Project, A Swift core library for providing unit test support

created time in a day

pull request commentapple/swift-collections

Add a priority queue implementation built on top of a min-max heap

@AquaGeek - just spent a little time doing an initial profiling, as I got similar results as you on my own machine - the run times per element seemed long compared to the C++ results in the article references earlier so I wanted to dig a bit on root causes. I found at least one thing which is a bummer - it seems swapAt will hit malloc and it is a known issue. So it seems to use around 30% of total run time goes there.

AquaGeek

comment created time in a day

PR opened apple/swift-tools-support-core

Reviewers
[5.5] Respect `SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET` when set (such as during Swift toolchain build)

This is the Swift 5.5 nomination of fixes for @available() annotations merged to mainline in #220.

(cherry picked from commit 21a79185b2ea8f89b9253ed8cdf2338bf564c499)

+12 -1

0 comment

1 changed file

pr created time in a day

PR opened apple/swift-tools-support-core

Reviewers
[5.5] Extend the availability annotations for the Netrc support to cover all the Darwin platforms

This is the Swift 5.5 nomination of fixes for @available() annotations merged to mainline in https://github.com/apple/swift-tools-support-core/pull/218.

(cherry picked from commit d6c996e9ab8565bbf9f2f9b3be35671ba32dcfe7)

+5 -5

0 comment

1 changed file

pr created time in a day

delete branch apple/swift-tools-support-core

delete branch : eng/anders/fix-netrc-availability

delete time in a day

delete branch apple/swift-tools-support-core

delete branch : eng/anders/allow-newer-min-deployment-target

delete time in a day

push eventapple/swift-collections

Rodrigo Kreutz

commit sha c0549b6284aadd5fd13156316f43fcb43c7fca77

Fixing a small typo on quick help documentation. (#55)

view details

push time in 2 days

PR merged apple/swift-collections

Fixing a small typo on quick help docs

When calling insert(_:at:) the returned index may be different than the requested index in case selected is false rather than true

Checklist

  • [X] I've read the Contribution Guidelines
  • [X] My contributions are licensed under the Swift license.
  • [ ] I've followed the coding style of the rest of the project. (No changes on code were made, only on the documentation)
  • [ ] I've added tests covering all new code paths my change adds to the project (if appropriate).
  • [ ] I've added benchmarks covering new functionality (if appropriate).
  • [X] I've verified that my change does not break any existing tests or introduce unexplained benchmark regressions.
  • [X] I've updated the documentation if necessary.
+1 -1

1 comment

1 changed file

rkreutz

pr closed time in 2 days

pull request commentapple/swift-collections

Fixing a small typo on quick help docs

@swift-ci test

rkreutz

comment created time in 2 days

PR closed apple/swift-evolution

Reviewers
[NFC] Rename file for SE-0302 to match accepted names.

Noticed the filename was out of date.

+4 -4

2 comments

3 changed files

varungandhi-apple

pr closed time in 2 days

pull request commentapple/swift-evolution

[NFC] Rename file for SE-0302 to match accepted names.

Yeah, that's why we didn't rename it when the proposal was retitled. If all the tooling gets updated, there are several different proposals we could do this to, but I'm not sure it's really worth the trouble.

varungandhi-apple

comment created time in 2 days