I've got about 5 to 10 Clojure programs I've written for each of the 5
benchmark programs (many of which are only minor variations of each other,
looking for ways to make it faster).  If you care to see any of the others,
they are on github here:

http://github.com/jafingerhut/clojure-benchmarks

There are definitely shorter Clojure programs that can solve these
problems.  In many cases (not necessarily all), those programs would also be
slower, and/or use significantly more memory, than the ones on the web
site.  Some of the problems involve keeping large strings (tens or hundreds
of megabytes, when using one byte for each ASCII character) in memory all at
once, and in those cases, it is important not to represent them with the
wrong data structure, or else your program won't be able to store it all in
memory (e.g. a Clojure lazy seq of characters uses over 50 bytes to
represent each element of the seq, at least on a machine with 64-bit
pointers).

Some of the Haskell submissions are quite long for what they do.  The
k-nucleotide one, for example, implements a mutable hash table using
features in Haskell that I had never seen before looking at that program.
Did they need to write all of that code to solve the problem?  No.  Did they
choose to, in order to get a much faster program that would be more
competitive in run time versus other languages.  Definitely.

Andy

On Thu, Sep 2, 2010 at 5:28 PM, Sean Corfield <seancorfi...@gmail.com>wrote:

> On Wed, Sep 1, 2010 at 9:46 PM, John Fingerhut <andy.finger...@gmail.com>
> wrote:
> > You can see a brief summary of results comparing
> > run time, memory, and code size against "Java 6 -server" here:
> >
> http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=clojure&lang2=java
>
> Very interesting. Clojure is faster than several languages
> (surprisingly so in some cases - at least for me) but seems to use
> more code to express solutions - which really surprised me!
> --
> Sean A Corfield -- (904) 302-SEAN
> Railo Technologies, Inc. -- http://getrailo.com/
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com<clojure%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to