One thing I noticed about your code is that you're using stack
shufflers in a few places where you could use combinators. For
example, stuff like

dup pc>> over instructions>> nth

should be

dup [ pc>> ] [ instructions>> bi nth

Also, generally words should not leave their inputs on the stack, with
only a few exceptions (like tuple setters that are generated for you).
So get-instruction should be ( vm -- insn ) and not ( vm -- vm insn ).

Do you intend to add support for building syntax trees to your implementation?

Slava

On Wed, Jan 28, 2009 at 5:02 PM, Paul Moore <[email protected]> wrote:
> 2009/1/28 Slava Pestov <[email protected]>:
>> That's a pretty decent speedup.
>
> On my machine, I'm now getting run times of 0.39 seconds, vs 0.14 for
> C - that's under 3x C's speed, which is pretty incredible for
> high-level code like this!
>
> Thanks for all the hints.
> Paul.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to