On Thu, Jun 25, 2015 at 5:53 PM, Peter Bex <pe...@more-magic.net> wrote:

> On Thu, Jun 25, 2015 at 10:26:53PM +0200, Peter Bex wrote:
> > On Thu, Jun 25, 2015 at 05:04:17PM -0300, Stephen Eilert wrote:
> > > Not sure about the status of this particular GSOC, but SBCL could also
> be
> > > "cheating".
> > >
> > > http://www.sbcl.org/gsoc2013/ideas/#sec-1.2
> > >
> > > Now, I thought GMP were GPL'd and SBCL not, so I'm unsure about the
> legal
> > > implications, if it does bundle GMP now.
> >
> > Thanks for posting that; I hadn't looked at the sbcl implementation
> > of the pi-digits benchmark, but indeed that page says "Pi digits on
> > the benchmarks game is currently a bunch of calls to GMP".  This would
> > *really* be cheating in my opinion, as it's not testing the language
> > implementation but using nonstandard extensions that replace stuff
> > that's already part of the core.
> >
> > I had just assumed it would be using the sbcl native implementation
> > (which indeed is pretty damn good and almost 100% pure Lisp code).
>
> In fact, there are two implementations, one of which uses native
> operations.  It is still faster than CHICKEN and very close to Guile/GMP:
>
>
> http://benchmarksgame.alioth.debian.org/u32/program.php?test=pidigits&lang=sbcl&id=2#log
>
> It does use some type annotations, though.  Adding some to the
> CHICKEN version makes it go a tiny bit faster, but not by much.
>
> Cheers,
> Peter
>

That compilation output is amazing!

; note: forced to do GENERIC-* (cost 30)
;       unable to do inline fixnum arithmetic (cost 4) because:
;       The first argument is a INTEGER, not a FIXNUM.
;       The result is a (VALUES INTEGER &OPTIONAL), not a (VALUES
FIXNUM &REST T).
;       unable to do inline (signed-byte 32) arithmetic (cost 5) because:
;       The first argument is a INTEGER, not a (SIGNED-BYTE 32).
;       The result is a (VALUES INTEGER &OPTIONAL), not a (VALUES
;
(SIGNED-BYTE 32) &REST
;                                                          T).


>From the benchmark page (
http://benchmarksgame.alioth.debian.org/u32/performance.php?test=pidigits#about
):

"In addition to language specific multiprecision arithmetic, we will accept
programs that use GMP <http://gmplib.org/>."

So, the "cheating" is official. Let's cheat too!
*I fail to see the point though. If it's a programming language shootout,
does it make sense to offload the meat of the processing to GMP?* *Do they
intend to measure the FFI performance?*


— Stephen
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to