Remix.run Logo
Performance Improvements in Libffi(atgreen.github.io)
8 points by atgreen 10 hours ago | 3 comments
rurban 4 hours ago | parent | next [-]

Oh, I thought he does this already. Why was there a prepare, when it doesnt prepare the arg decoding.

tadfisher 2 hours ago | parent | prev [-]

Can we AOT-compile stubs instead of interpreting or JIT-compiling? I feel like most FFI users would call static, well-defined functions.

atgreen 2 minutes ago | parent [-]

Yes, that's part of what was done here. So, create a plan, and then for some subset of plans, create AOT-compiled templates. The analogies are: a) original implementation is like interpreting via walking a syntax tree b) building/caching an execution plan is like interpreting by executing bytecode generated from the syntax tree c) using an AOT-compiled template is like execution from qemu's old TCG template system But we only do (c) for a popular subset of function signatures. The biggest win was (b), but (c) is still an improvement over (b).