On Wed, Jul 1, 2009 at 2:08 PM, Daniel Lyons<fus...@storytotell.org> wrote:
>
>
> On Jul 1, 2009, at 2:24 PM, fft1976 wrote:
>
>> Isn't it strange that Clojure with type declarations (that some people
>> say should be as fast as Java) was only as fast as Python (which does
>> not allow type declarations and does not exactly have a reputation for
>> speed)?
>
>
> Unless the two implementations share the same general design and
> algorithms, we're comparing apples and oranges. Quicksort in Python
> will always dominate bubble sort in Clojure.

But each language encourages a certain style of design and algorithm,
so it IS fair to compare the way that the language encourages a
certain approach.  For example, Clojure encourages you to use a more
functional approach and persistent data structures.  If this ends up
being way slower than the mutable approach that Python encourages,
that is worth knowing.

I remember one year, my ICFP VM in Python ran ridiculously slow in
part because Python doesn't have a switch statement, whereas other
languages do.   So it is useful to look at what a language does and
does not allow you to do, and how that impacts speed.

My point is: no comparison is going to be exactly apples to apples,
but the comparison can still be useful.

--~--~---------~--~----~------------~-------~--~----~
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