4 ms·
The author mentions that for real things the PLT and indirect call overhead is in the noise, which makes you wonder what the point of all of this is. Besides,
by cryptonector 8y ago
The author mentions that for real things the PLT and indirect call overhead is in the noise, which makes you wonder what the point of all of this is. Besides, the headline is click-bait, and the contents is obnoxious: it's all about static vs. dynamic linking vs. using dlopen()/dlsym(). There's nothing in TFA specific to C, for example, nor even to Lua, as any statically-linked program written in any high-level programming language with an FFI to C or assembly will evince this performance advantage over a dynamically-linked version of the same.
- BeeOnRope 8y agoThis 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).