
Can Swift code call C code without overhead? - cpcat
http://lemire.me/blog/2016/09/29/can-swift-code-call-c-code-without-overhead/
======
Someone
That conclusion is a bit premature. The conclusion one can draw is that Swift
can efficiently call C code taking int pointers (possibly even inline it I
would like to see the assembly for the generated code)

Stronger tests would pass structs, classes, collections or (probably the
biggest challenge for interop) strings as arguments, and return such items to
the caller.

Given the design of Swift, I expect it to do well on almost all of these.
Strings and collections likely are exceptions, as calling C functions that
aren't tweaked to accept Swift structures will require marshaling.

