Performance
heri16 opened this issue · 1 comments
heri16 commented
Is this an FFI library or an Addon?
http://programminggiraffe.blogspot.com/2014/10/nodejs-ffi-vs-addon-performance.html
kentonv commented
It's an addon, but the v8 -> C++ calling mechanism is not the main problem here. The problem is that once we get to C++ we're calling the Cap'n Proto dynamic API, which is based on lookup tables and such and is therefore quite a bit slower than accessing a native Javascript object would be. Regular C++ code using Cap'n Proto relies on generated code for performance, but we can't generate and compile new C++ code whenever Javascript tries to import a schema.