Skip to content

Add simple benchmark for append(contentsOf:) #5436

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

Conversation

airspeedswift
Copy link
Member

@airspeedswift airspeedswift commented Oct 25, 2016

Adding this simple benchmark in preparation for a handful of ABI-related refactoring changes.

There is room for improvement in these tests, as well as the original single-element appends on which they're based, in terms of:

  • picking the actual number of times/elements to append on a more principled basis (current values are arbitrary)
  • testing multiple possible types in the array:
    • 1 swift class.
    • struct with 2 swift class.
    • enum with single trivial payload
    • enum with single non-trivial payload
    • enum with multiple trivial payloads
    • enum with multiple non-trivial payloads
    • objective-c class
    • Existential Box.
    • Unspecialized Generic Type

all of which may have different performance characteristics.

But for now this should serve to indicate if most planned changes have significant perf impact.

@airspeedswift
Copy link
Member Author

@swift-ci please benchmark

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)


@airspeedswift
Copy link
Member Author

airspeedswift commented Oct 25, 2016

Appears benchmarking comparison script can't handle new benchmarks. But aside from that looks to be working correctly (rdar://problem/28942824).

@swift-ci please smoke test and merge

@shahmishal
Copy link
Member

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit e4551d7 into swiftlang:master Oct 25, 2016
@airspeedswift airspeedswift deleted the append-contentsOf-benchmark branch October 25, 2016 21:52
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.

3 participants