Hello all,

Just wanted to add a small remark. If you look at the shootout, most
languages considered now to be very efficient has been once said to be 
very very slow and not usable.

In the eighties, functional languages were doomed to be slow and
unusable for anything. And Ocaml/MLton and the like are now very fast.

Next laziness was thought to be too slow to be practical, and now
someone used ghc in this thread as an example of fast language.
I think everybody remembers what was being said about java 10 years ago.
And now java is the goal to attain.
I even think than C and C++ where too slow to be usable at their time.

Getting a compiler to produce fast code takes time and Clojure is young.

 What would be more useful than this discussion would be to take
fragments of code that looks inexplicably slow, profile them, and
transform them by hand to be faster.
And keep a wiki with which transformation gives which performance
improvement. 
This could serve 3 goals:
 - giving ideas to people on how to optimize (the doc does not contain
every trick);
 - allow to write ugly but very efficient macros, that can be used in
bottlenecks ;
 - give ideas to which code transformation performed by the compiler
will improve performance and by how much.

What is sure is that there is no reason why clojure should be slow, when
some functional languages (including dynamically typed ones) are fast. 
So, one day, it will be fast. 

Best,

Nicolas.
 

On Tue, 2009-08-11 at 21:20 -0700, James Sofra wrote:
> Hi fft1976,
> 
> > If you use Java's arrays and declare all types, should Clojure be as
> > fast as the equivalent Java?
> 
> <snip>
> 
> So is the question you are trying to ask that since we have unwrapped
> access to Java is Java code written in Clojure as fast as if it were
> written as actual Java code?
> 
> I guess that is a worthwhile question since it would at least tell you
> (if you are worried about speed) whether it is worth while dropping
> down to write actual Java code or if you can just write your Java in
> Clojure (as unidomatic as that Clojure code may be).
> 
> I am sorry I don't have an answer for you, just wanted to clear up the
> question.
> 
> Cheers,
> James
> 
> > 


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