Commit Graph

3 Commits

Author SHA1 Message Date
Egor Zhdan
e6e5524fb1 [cxx-interop] Increase the size of std::strings in benchmarks
Since https://github.com/swiftlang/swift/pull/75608, the performance of `std::string` <=> `Swift.String` conversions improved significantly. To make sure the workload is significant enough for the benchmark results to be noise-free, this bumps the size of Swift strings that are being tested.
2024-10-01 13:24:35 +01:00
Egor Zhdan
34c2b0e50d [cxx-interop] Make String.init(std.string) unlabeled
`Swift.String` can be initialized from any other type with an unlabeled initializer, which is either going to use the `CustomStringConvertible` conformance, or reflection. We would like clients to use the most suitable initializer, which is the one that takes `std.string` as a parameter. For instance, that allows us to attach a doc comment to the initializer.

This change makes the initializer unlabeled to make sure it is chosed by overload resolution when a client invokes `String(myCxxString)`.
2023-02-02 12:47:08 +00:00
Egor Zhdan
d288b16420 [cxx-interop] Add benchmark for conversion between C++ and Swift strings 2023-01-25 00:17:49 +00:00