You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A-FFIArea: Foreign function interface (FFI)A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsI-slowIssue: Problems and improvements with respect to performance of generated code.
Currently when we call into C code we don't update the stack pointer to account for the native stack segment, and when we call back into Rust code we immediately switch back to a Rust stack, wasting space on the native stack.
Instead, we should treat the foreign segment the same as any other - putting it into the TCB. Instead of an explicit stack switch to call Rust code, we'll just Run it on the foreign stack. Then the Rust code will start adding new stack segments as needed.
This will give uv callbacks better performance, and will eliminate some of performance concerns around calls from SpiderMonkey into the Rust DOM.
It will also eliminate the need to set the TCB stack pointer to 0 when entering the native stack, eliminating some of the need for no_split_stack. (#1804, #1226)
The text was updated successfully, but these errors were encountered:
Nominating for a milestone. I'm not entirely sure how this interacts with the current runtime along with all the FFI changes for extern fns that happened recently. I would suggest milestone 1 because this sounds like it will likely help define how we manage stacks during FFI, but I would also be OK with other milestones.
A-FFIArea: Foreign function interface (FFI)A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsI-slowIssue: Problems and improvements with respect to performance of generated code.
Currently when we call into C code we don't update the stack pointer to account for the native stack segment, and when we call back into Rust code we immediately switch back to a Rust stack, wasting space on the native stack.
Instead, we should treat the foreign segment the same as any other - putting it into the TCB. Instead of an explicit stack switch to call Rust code, we'll just Run it on the foreign stack. Then the Rust code will start adding new stack segments as needed.
This will give uv callbacks better performance, and will eliminate some of performance concerns around calls from SpiderMonkey into the Rust DOM.
It will also eliminate the need to set the TCB stack pointer to 0 when entering the native stack, eliminating some of the need for
no_split_stack
. (#1804, #1226)The text was updated successfully, but these errors were encountered: