2 ms·
This doesn't seem right. Many languages have only a single way to do FFI (e.g., usually via calling a dynamic object) so the concept of "statically linked FFI"
by BeeOnRope 8y ago
This doesn't seem right. Many languages have only a single way to do FFI (e.g., usually via calling a dynamic object) so the concept of "statically linked FFI" doesn't even apply to many languages.
The whole GOT/PLT thing is kind of C/C++ specific, since that's compiled into the calling code, and supports specific C ABI features like symbol interposition, and so is not a necessary component of calling a dynamic library. Especially JIT-compiled languages don't really need either of the features the GOT or PLT offer.
I think the main performance are really (1) dynamically linked C/C++ with GOT + PLT, (2) statically linked C/C++ and then (potentially) separate categories for the FFI mechanism for various high level languages, which may happen to coincide with (1) or (2) or have some other behavior.
Certainly the very slow results for some languages indicate that they are doing something other than a plain call via mechanisms (1) or (2).