Replies: 1 comment 1 reply
-
The intention is that a deferred call should be really fast so this is not a significant cost. All the actor calls will also have the deferred-call cost. Writing the deferred call arguments in the queue is not so different in cost to setting up a normal call on the stack (if registers aren't used). So it is fast. In addition, it's part of the actor contract that actor startup may be asynchronous. Only the actor implementation code knows whether it needs prep time. The user code calling the actor can't know that in general. So you're hard-coding knowledge of the actor implementation into the user-code calling site, breaking the separation of concerns. So that means rewriting calling code if the actor changes its prep behaviour. I guess we could have an Do you have a real-world situation that requires this? Does profiling show that it is a cost worth optimising? |
Beta Was this translation helpful? Give feedback.
-
Roughly what it says on the tin, for Actors that don't have any real
Prep
behaviour, allow constructing them directly into theReady
state without needing to defer anapply_prep
.Beta Was this translation helpful? Give feedback.
All reactions