-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
perf(ext/ffi): optimize synchronous calls #14945
perf(ext/ffi): optimize synchronous calls #14945
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, these are very impressive results
I want to discuss this in CLI design meeting, because it bypasses ops. |
Also unintentional SWC downgrade? |
Taking Fast API into usage will require using This doesn't mean it shouldn't necessarily be done but probably does mean that it should be opt-out'able. |
How so? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look at cli/Cargo.toml |
Huh, on the GitHub mobile app I see a bunch more changed files. I guess must be a bug. It looks correct on the website... sorry for the noise. |
This commit implements an optimization
for blocking FFI calls.
op_ffi_load
creates JS functions forsynchronous symbols. This avoids
reallocations that existed in
op_ffi_call
and allows future V8 fast API optimizations.
Each function owns an allocation to corresponding
the Symbol, which is freed on GC.
Nonblocking ops & statics are still registered JS
side and use ops to make calls.