ffi_call_plan caching for GLib
Summary
GLib adopts libffi's new ffi_call_plan caching to reduce GClosure invocation overhead by 10-25%, with merge request submitted and frame-pointer patches for profiling.
View Cached Full Text
Cached at: 07/24/26, 07:05 PM
Similar Articles
Performance improvements in libffi
This article details a performance improvement in libffi, where caching argument placement as a flat list of moves (a 'plan') eliminates redundant reclassification on every function call, offering significant speedups without resorting to JIT compilation.
The Fil-C Optimized Calling Convention
The Fil-C optimized calling convention ensures memory safety for C programs even under adversarial misuse, while maintaining efficiency by omitting safety checks in the common case. It explains the generic and register-passing optimizations that handle type violations via panics or well-defined behavior.
Tail-call optimization in C is relatively recent
A LWN comment discusses the relatively recent implementation of tail-call optimization in C compilers, citing historical limitations and noting that modern GCC and Clang now support it, with potential benefits for interpreter implementations.
Fil-C: Garbage In, Memory Safety Out
Fil-C is a fully memory-safe implementation of C/C++. It bundles pointer values with boundary information using invisicaps at the LLVM IR stage, achieving high compatibility with a performance penalty of about 4x.
Pipeline parallelism in llama.cpp may be wasting your VRAM
Testing shows that default pipeline parallelism in llama.cpp wastes VRAM with no speed benefit; compiling with GGML_SCHED_MAX_COPIES=1 saves significant VRAM while maintaining identical inference speed.