[Shootout-list] Ruby, Python, Gforth heapsort benchmarks

Jabari Zakiya jzakiya@mail.com
Sun, 17 Apr 2005 23:02:22 -0500


> --- Jabari Zakiya wrote:
> > I just uploaded new heapsort benchmarks for
> > Ruby, Python, and Gforth.
>=20
> Thanks.
> Someone will take care of them when they browse contribute programs -
> we don't need an announcement email.
>=20
> > These benchmarks use native zero-indexing
> > for the arrays, and also displays the first
> > and last sorted array elements (which works
> > as a quick sanity/accuracy check).
>=20
> The "correct" output is shown here
> http://shootout.alioth.debian.org/benchmark.php?test=3Dheapsort〈=3D=
all&sort=3Dfullcpu#about

> Obviously none of these 3 programs produce the correct output - please
> don't waste our time sending programs that don't meet the requirements.

Excuse me for being unclear. The point of altering the programs output
was to suggest a better output for this benchmark. If the first array
element had been required to be displayed originally, an inaccurately
sorted array would have been immediately detected in most instances.

To create 'standard' output do:

Ruby:     printf "%.10f\n", ary.last

Python:   print "%.10f" % ary[N-1]

Gforth: delete/comment line in 'main' -- ( ra N) over f@ my-f. ."  "

> And please add each program as a separate item in Contribute Programs,
> and follow the steps for contributing a program listed in the FAQ.

Since I have only dialup service, it was more efficient for me to send
one file with three programs than three separate files.

It is trivial to produce the separate files from the one I sent.
1)Open file in favorite text editor.
2)For language version desired, delete code for other two.
3)Use 'save as' feature to name/save file, e.g. heapsort.rb for Ruby.=20
=20
> best wishes, Isaac

As well, Jabari

--=20
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm