Re: Performance assistance / advice

"David McClain (as dbm at refined-audiometrics dot com)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
… apart from the lack of concurrency and transactional behavior, you could use continuations to specify the target in a message. That is more general than call/return. But it has the overhead of forming a continuation, which is far more costly than simply delivering a message to a passive functional closure contained in an envelope.

Note that the envelope merely allows the behavior of an Actor to change without also changing its external identity. If we could dig inside of functional closures we could do the same thing and use function jumps (not calls) as in CPS style.



> On Mar 12, 2025, at 17:51, David McClain (as dbm at refined-audiometrics dot com) <[email protected]> wrote:
> 
> Finally, in Call/Return or continuation based behavior, the results of a function execution are returned either to the caller, or else to the known continuation.
> 
> But Actors never reply directly to any sent messages. They don’t even know who the sender was. But they can be told to send a result to some specified Actor in the message. This is much more general than call/return or even continuation calling. It is a dynamic dispatch capability.
> 
>> On Mar 12, 2025, at 17:47, David McClain <[email protected]> wrote:
>> 
>> What seems to be missing is concurrency in the function calls, as well as transactional behavior.
>> 
>> 
>> 
>>> On Mar 12, 2025, at 17:44, Tahoma Toelkes (as tahoma_toelkes at yahoo dot com) <[email protected]> wrote:
>>> 
>>> Shouldn't every continuation call provide a context switch opportunity since they carry along a copy of relevant dynamic stack?  What am I missing?
>>> 
>>>> On Mar 12, 2025, at 5:39 PM, David McClain <[email protected]> wrote:
>>>> 
>>>> But this would obviate (parallel for sure) concurrency. It would tie up a machine thread indefinitely and offer no chance to switch threads in the middle of the execution.
>>>> 
>>>>> On Mar 12, 2025, at 17:33, Tahoma Toelkes <[email protected]> wrote:
>>>>> 
>>>>> Not necessarily, I believe.  One of the reasons that I referenced the Chez Scheme compiler earlier is that, if I recall correctly, it works (or at least, it did a few decades ago) in part by applying a source-to-source continuation-passing-style transformation to the full call graph, implying to me that a fully continuation-based semantics as a superset is possible, even if it might not be very comfortable to actually write in practice.  Actually, it's for this reason alone I suspect that the red-vs-blue call graph problem isn't unavoidable.
>>>>> 
>>>>> -- Tahoma
>>>>> 
>>>>>> On Mar 12, 2025, at 5:00 PM, David McClain (as dbm at refined-audiometrics dot com) <[email protected]> wrote:
>>>>>> 
>>>>>> .. and so once you move the indirection up a level into a wrapper, we lose the equivalence between function calls and Actor message sends.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> On Mar 12, 2025, at 16:59, David McClain <[email protected]> wrote:
>>>>>>> 
>>>>>>> Yes, I am aware of Steele’s comments about Actors.
>>>>>>> 
>>>>>>> However, Hewitt’s Actors require the ability to perform a BECOME - to become a different “function” on succeeding messages. I fail to see how a simple lambda expression could do this. But a closure could do so.
>>>>>>> 
>>>>>>> But lacking any visibility into functional closures in either Lisp or Scheme, we are left with encapsulating a closure (for private data + function) into a wrapper envelope for the indirection needed to perform a BECOME.
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>> On Mar 12, 2025, at 16:52, Tim Bradshaw (as tfb at cley dot com) <[email protected]> wrote:
>>>>>>>> 
>>>>>>>> On 12 Mar 2025, at 22:16, David McClain <[email protected]> wrote:
>>>>>>>>> I believe Scheme was an outgrowth in the late 80s for the Connection Machine??
>>>>>>>> 
>>>>>>>> Almost.  There was Planner, which I don't think ever really existed, and then Conniver which I think was an implementation of something with incoherent semantics.  Then Hewitt invented Actors, and ?Steele and Sussman? wanted to implement Actors in terms of lambda calculus on top of maclisp, and at some point had the blinding realisation that actors and functions (ie lambda expressiona) which never returned but just called another function (their continuation) were the same thing.  The resulting unified language was called 'Schemer'.  But ITS had six-character filenames.
>>>>>>>> 
>>>>>>>> The connection machine thing was *Lisp which I think was built on Genera (or perhaps its predecessors).  *Lisp would be a good thing to look at for ideas for vectorisation, probably (I only ever played with the simulator and I have no idea if it would run in a modern CL).
>>>>>>>> 
>>>>>>>> --tim
>>>>>>>> 
>>>>>>>> _______________________________________________
>>>>>>>> Lisp Hug - the mailing list for LispWorks users
>>>>>>>> [email protected]
>>>>>>>> http://www.lispworks.com/support/lisp-hug.html
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Lisp Hug - the mailing list for LispWorks users
>>>>>> [email protected]
>>>>>> http://www.lispworks.com/support/lisp-hug.html
>>>>> 
>>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Lisp Hug - the mailing list for LispWorks users
>>> [email protected]
>>> http://www.lispworks.com/support/lisp-hug.html
>> 
> 
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> [email protected]
> http://www.lispworks.com/support/lisp-hug.html


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.