1 comment

[ 2.5 ms ] story [ 26.5 ms ] thread
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.