On Tue, Oct 20, 2009 at 8:58 PM, Hugh Aguilar <[email protected]> wrote:
> In regard to Factor, all that I did was inlining as I wasn't able to figure 
> out
> what Slava was talking about in regard to rewriting HOW-FAR. This shaved off
> about 3 minutes from the Factor time, which was pretty good, although not as
> significant as the effect on Forth.

Here is a version of LC53 that doesn't use dynamic variables:

http://paste.factorcode.org/paste?id=998

It also uses TYPED: in one place to make the Factor compiler generate
a specialized 'find' loop over byte arrays, instead of dispatching on
each iteration. I got a 30% speedup with these changes, they also have
the nice effect of making the code simpler.

Once Factor's compiler has support for native-size integers, it will
be able to run this program much faster without any changes to the
code, since it will not need to allocate bignum objects and dispatch
between fixnum and bignum types anymore.

On the other hand, I find the Forth version of the benchmark to be
completely unreadable.

Slava

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to