This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: guile-vm-0.0


Keisuke Nishida <kxn30@po.cwru.edu> writes:

> > [...] Going further would mean more aggressive compile-time
> > analysis and moving the tree-codes away from being close to
> > Scheme.
> 
> Yes.  I can easily add any optimization wherever more speed is needed.
> Also, it seems the VM produces less garbages during execution, since
> most execution is done on the stack.  This reduces the time spent in GC.

Yes, I planned to introduce something like that in my tree-evaluator
to avoid consing up environment frames that are known to be used in a
stack-like manner.  In the end, I would probably have a bastard of a
Scheme interpreter that is not really simpler than the current one and
has none of its advantages.

> And this is the result with no computed goto (non-GCC support):
> 
>   guile> (time (vm-run (make-vm) (compile '(loop 0 30000000))))
>   clock utime stime cutime cstime gc
>   17.15 17.12 0.01  0      0      0
>   30000000
> 
> It's about 2.5 times slower :(

Wow, I didn't expect this.  When I first read about GCC's support for
computed gotos and that they canb be used to write very fast virtual
machines, I thought, come on, how much can that be?  I mean, a switch
isn't exactly slow either.  But...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]