unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Chris Vine <chris@cvine.freeserve.co.uk>
To: Arne Babenhauserheide <arne_bab@web.de>
Cc: guile-user@gnu.org
Subject: Re: Guile benchmark
Date: Tue, 28 Feb 2017 12:55:59 +0000	[thread overview]
Message-ID: <20170228125559.2bfefa13@dell.homenet> (raw)
In-Reply-To: <87poi21uen.fsf@web.de>

On Tue, 28 Feb 2017 11:28:32 +0100
Arne Babenhauserheide <arne_bab@web.de> wrote:
> Chris Vine <chris@cvine.freeserve.co.uk> writes:
> 
> > On Mon, 27 Feb 2017 21:00:54 +0100
> > Andy Wingo <wingo@pobox.com> wrote:  
> >> Hi,
> >> 
> >> On Thu 26 Jan 2017 09:39, Rchar <rchar@protonmail.com> writes:  
> >> > https://ecraven.github.io/r7rs-benchmarks/benchmark.html
> >> > Is Guile slow or fast, comparing to others?    
> >> 
> >> Schemes that compile to native code go faster.  Guile compiles to
> >> bytecode right now, so it's generally (though not always!) slower
> >> than the native-compiling schemes.  But compared to the
> >> bytecode-interpreter schemes it's pretty fast.  
> >
> > On reading this, out of interest I wrote a very simple program
> > solving primes, using the basic 'seive odd divisors to square root'
> > algorithm. I tested guile-2.0, guile-2.2, chicken and chez scheme
> > on it.
> >
> > guile-2.0 was a little slower than chicken with chicken compiled to
> > C, but guile-2.2 on that test took about 75% of the time of
> > chicken, and about 50% of the time of guile-2.0.  chez scheme was
> > fastest of all, taking about 50% of the time of chicken.  OK,
> > chicken may not be the fastest of "compile to C" schemes.  
> 
> Do I read this correctly that Chez took only about 30% less time than
> Guile 2.2?
> 
> Could you try stalin, too? (Chez wins 28 comparisons, Stalin 14, so
> that would be an obvious target)

I feared that my enumeration might confuse.

No, on my Haswell laptop running 64-bit linux, solving the 40,000th
prime (479909) is 1.26 times faster in chez scheme than in guile-2.1.7,
on the simple algorithm. (0.509 seconds versus 0.624 seconds, on a
i7-4712HQ CPU @ 2.30GHz.)  This is only the time taken in the body of
the calculation.  Start-up times and printing times and so forth are
ignored.

I have just tried out the same code on an older Sandybridge desktop
@3.30 GHz running 32-bit linux which I can access remotely, and that had
chez scheme 1.7 times faster than guile-2.1.7 so it looks to be
somewhat CPU and/or cache and/or pointer-width sensitive. Anyway, it is
just one benchmark.

I think I am about schemed out so installing Stalin is probably not an
option.  Like you, I am told it is fast.  Guile's selling point IMO is
its libraries and its FFI.  Guile 2.2 certainly seems adequately fast
at run time.  Possibly compile times may be an issue, I don't know.

Chris



  reply	other threads:[~2017-02-28 12:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26  8:39 Guile benchmark Rchar
2017-01-26 21:56 ` Mike Gran
2017-01-26 22:11   ` Linas Vepstas
2017-01-30 14:16 ` Ludovic Courtès
2017-02-27 20:00 ` Andy Wingo
2017-02-27 23:35   ` Chris Vine
2017-02-28 10:28     ` Arne Babenhauserheide
2017-02-28 12:55       ` Chris Vine [this message]
2017-03-01  0:24         ` Arne Babenhauserheide

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170228125559.2bfefa13@dell.homenet \
    --to=chris@cvine.freeserve.co.uk \
    --cc=arne_bab@web.de \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).