[MUD-Dev] concerning tokenization, compilation, performance, and other fun stuff.

Ola Fosheim Grøstad <olag@ifi.uio.no> Ola Fosheim Grøstad <olag@ifi.uio.no>
Mon Jan 3 14:47:11 CET 2000


Nate Cain wrote:
> techniques.  It seems to me (And I am no authority as I have never
> implemented a full driver, library, or compiler for any complex
> language) that the optimal solution for programming mud objects would be
> to have all of the objects be dynamicly linked libraries of some sort.

I'm no authority either, and my personal MUD projects never take off,
although I'd claim they all have implied novel new ideas. (hhmm.. that
could be the reason). Still, I have to say this:

*SCREAM* *FAINT* *BANG* *BANG* *BANG*

Anyone noticing an emerging pattern here? Every autumn we have a PK
debate (endless, repetitive and mostly pointless, I might add) and now
we'll have an annual dynamic linking project around new year... Not your
fault of course, it seems to be a geek instinct, assumed to be triggered
by excessive exposure to firecrackers. Kill in the autumn, link in
January.

I'm not going to try to convince anyone that there are other more basic
challenges that needs to be addressed in order to advance the state of
the art, because that has proved to be very time-consuming and
counterproductive in the past. 

So, why not aim for something more flexible, like a JIT?  There could be
some problems with your OS of choice and self modifying code, but as
there are open sourced approaches to look at (kaffe?) it could be a
reasonable learning experience? If you limit yourself to the most basic
operators on strings and integers, plus conditionals and function calls
then it could actually be done in a fair amount of time. You don't even
have to generate particularly good code in order to beat an interpreter!
One advantage is that you can prune out constant conditionals and
provide many "code snippets" for the same method optimized for different
circumstances. That's actually how you optimize a graphics driver, so
you can in theory get faster code than that generated by a regular
compiler (this is because the conditions are not known until run-time).

If you embark on this, then I would suggest using pc-relative code to
make your life easier in the start...

Ola.




_______________________________________________
MUD-Dev maillist  -  MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list