Re: [wmii] [ANN] Rumai 1.0.0

From: Suraj N. Kurapati <snk_AT_gna.org>
Date: Sun, 27 Jan 2008 09:07:41 -0800

Kris Maglione wrote:
> I like your new 9P code. It has the best aspects of mine, and none of
> the worst. It's nice. Some of the things you do are pretty clever.

Thanks Kris (and welcome back)! This is a great honor for me.

> message_types.rb, though... You seem to have read that 'high level
> message passing in ruby' article/blog entry. Other than that, I like the
> idea.

I had not read such an article and there was no message_types.rb in
my code. However, I believe you are referring to the
over-aggressive OOP factorization of Message classes.

Initially, I just had a single Message class that performed to/from
9P byte-stream conversion for all types of messages (KISS, YAGNI).
After I did some profiling, it showed that this runtime message
processing (if format == blah, do blah blah, ...) was a performance
bottleneck.

So I simply factored the conditional runtime into specialized
classes / traits which each only handled their particular case.
Gained a 129% speed up from doing this, and it didn't make the code
too much more complex. :-)
Received on Sun Jan 27 2008 - 18:07:56 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:35:15 UTC