The _StringProcessing module provides a generic, collection-based
`contains` method that performs poorly for ranges and closed ranges.
This addresses the primary issue by providing concrete overloads
for Range and ClosedRange which match the expected performance for
these operations.
This change also fixes an issue with the existing range overlap tests.
The generated `(Closed)Range.overlap` tests are ignoring the "other"
range type when generating ranges for testing, so all overlap tests
are only being run against ranges of the same type. This fixes things
so that heterogeneous testing is included.
The two benchmarks don't currently build in some configurations. Also
disabled building ReadAccessor whose running had previously been
disabled because it doesn't build anymore.
rdar://128520766
* Revert "Revert count(where:)"
This reverts commit 779ea19a6a.
Now that SE-0220 has been re-accepted, this adds the `count(where:)`
Sequence method to the standard library.
* [SILOptimizer] Add prespecialization for arbitray reference types
* Fix benchmark Package.swift
* Move SimpleArray to utils
* Fix multiple indirect result case
* Remove leftover code from previous attempt
* Fix test after rebase
* Move code to compute type replacements to SpecializedFunction
* Fix ownership when OSSA is enabled
* Fixes after rebase
* Changes after rebasing
* Add feature flag for layout pre-specialization
* Fix pre_specialize-macos.swift
* Add compiler flag to benchmark build
* Fix benchmark SwiftPM flags
* Add benchmarks that measure KeyPath read and write performance.
* Added setUpFunctions. Revised number of iterations per benchmark.
* Include n as a factor in the number of iterations.
* Increased number of iterations for KeyPathDirectAccess by a factor of 25.
* One last tweak to the number of iterations on testDirectAccess to get them above 20 us.
* Made revisions based on feedback. Added three new benchmarks.
* Added benchmarks to exhaustively benchmark all KeyPathComponent types. Removed benchmarks dealing with an inlining issue.
* Wrapped additional keypaths with identity() where needed. More cleanup and documentation.
* Moved KeyPaths for KeyPathRead and Write into FixedSizeArrayHolder. Renamed GetSet to Getset.
* Added inline(never) to both versions of getKeypathToElement().
* Moved identity() wraps so that they're called once per variable per benchmark.
* Moving destinationKeyPaths into FixedSizeArrayHolder to try to reduce long setup overhead errors.
* Additional moving of the identity() wrapping into the singleton's init() to try to reduce setup time errors.
Add a new benchmark module StringSplitting for split-like benchmarking.
Add lineSink benchmarks, which separates Unicode content by lines and feeds
Strings into a sink.
* Add differentiation benchmarks.
* Make install name of _Differentiation be @rpath/libswift_Differentiation.dylib.
Co-authored-by: Marc Rasi <marcrasi@google.com>
Clean up a few general patterns that are now obviated by canImport
This aligns more generally with the cleanup that the Swift Package
Manager has already done in their automated XCTest-plumbing tool in
apple/swift-package-manager#1826.