Re: Mason acceleration using C++

Dave Rolsky <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
On Tue, 12 Apr 2005, Jeremy Kronuz wrote:

> I'm new to the Mason world, but I just wanted to know what's holding Mason 
> from reaching the Embperl performance shown in some benchmarks. For what I’ve 
> read is the C portion of Embperl that makes it faster. Couldn’t it be 
> possible to rewrite strategic parts of Mason in C or C++ to surpass Embperl 
> performance? That’s just a thought I’ve been having since I’m more inclined 
> to Mason, but I like Embperl speed, and I don’t think it’s just a 
> philosophical matter; technically Embperl has a point there, I believe.

We've discussed this a bit before.  The problem here would be trying to 
find some portion of the code that would both give a big speed boost and 
also be reasonably easy to convert & maintain.

The obvious big chunk is the lexer/compiler code, but given that we have 
things like static_source mode to minimize parsing, this would probably be 
a waste of time.

I'm not sure what else would be a good target.  Much of the code is broken 
up into small methods, which aren't very amenable to translating to C.

In my experience, the pieces that benefit most from being in C are complex 
algorithms that can be wholesale rewritten into C (like I did for 
DateTime), but Mason realy doesn't have much that fits in that category.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/
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.