Commit Graph

5 Commits

Author SHA1 Message Date
John Hui
ff596d5932 Revert "[cxx-interop] Temporarily exclude CxxSetToCollection benchmark from the build (#81145)"
This reverts commit 86c30d6b58.
2025-04-30 18:36:57 -07:00
Egor Zhdan
86c30d6b58 [cxx-interop] Temporarily exclude CxxSetToCollection benchmark from the build (#81145)
This is needed to unblock nightly toolchains, which are currently failing to build with an assertion:
```
swift-frontend: /home/build-user/build/buildbot_linux/llvm-linux-x86_64/tools/clang/include/clang/AST/TypeNodes.inc:79: TypeInfo clang::ASTContext::getTypeInfoImpl(const Type *) const: Assertion `!T->isDependentType() && "should not see dependent types here"' failed.
```

rdar://150067288
2025-04-29 09:57:39 -07:00
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