[1215] in Coldmud discussion meeting
Re: [COLD] Pause, suspend and re-entrancy....
daemon@ATHENA.MIT.EDU (Fri Jan 17 05:40:49 1997
)
From: silovic@srce.hr (Miroslav Silovic)
In-Reply-To: <32DF376E.3F1D@ten.net> from Jeff Kesselman at "Jan 17, 97 00:25:18 am"
To: jeffk@ten.net (Jeff Kesselman)
Date: Fri, 17 Jan 1997 11:24:55 +0100 (MET)
Cc: coldstuff@cold.org
> Something ocurred to me the other night.....
>
> What prevents Genesis from re-entering an object with a Paused or
> Suspended method on another thread? Seems pretty dangerous unless there
> is a JAVA like "monitor" than can be sued for synchronization.
It's also completely prevented by the fact that Cold doesn't support
threads yet. :) Yes, there will be locking, once we need it.
>
> The Interperter currently does a C function call through a dispatch
> table for EVERY opcode. I suspect by judicious in-lining with a
> switch() statement in teh execute() function of the most common
> operators (things like +, -,++,--) we could SIGNIFICANTLY improve
> performance..... a C-call per fundemental math op is really kinda sick
> and totally unecessary, IMO.
>
Actually, there wouldn't be any improvement. Operators, even the 'trivial'
ones, spend far more time than a single C call on typechecking their
arguments.
Although, admittedly, profiler I used still reports that Cold spends
unpleasant ammount of time in the main intepreter loop. I don't really
think this can be easily fixed, and as for the /hard/ way to fix it...
Well, we're working on it. :)
Miro