Jonathan Shore a écrit :

I don't really share your worries at this time because the kind of performance problem you describe can always be fixed in a later optimized implementation.

Perhaps not, but most of my work would have to be done in Java, which for me would be unacceptabe. I'm thinking Clojure is premature for my work at the moment.

I am in a similar situation in that most of my computing needs involve number crunching. However, my experience (after 15 years of using Python as my main programming language) is that I can always concentrate time-critical code in a very few routines that I can then optimize by switching to a more performance-oriented languange (Pyrex for Python, probably Java for Clojure). That's why I am not worried about such issues at the moment. I am interested in Clojure for large-scale program structure and for dealing with concurrency, which I think are harder problems than optimizing an inner loop.

Of course I am not claiming that this is good for everyone, I am just pointing out why I think Clojure is of interest for number crunchig right now.

I recognize that Clojure is a smaller effort. It may well be that

Exactly, and that comes with good and bad aspects, as so often. Th good part is that Clojure is much more innovative than anything designed by a committee could ever be, in particular in the way it deals with concurrency.

I could be wrong, but would think that:

*static* *public* *int* intCast(Object x){
*if*(x *instanceof* Number)
*return* ((Number) x).intValue();
*return* ((Character) x).charValue();
}

the "if" statement is not going to be optimised away by JIT. (This is what gets called on the literals).

The JIT compiler does special-casing of functions for particular argument types. I don't know if it handles that particular kind of optimization, but it's not impossible.

That is actually something I worry more about than raw performance, in the long run. Portable performance optimization seems pretty much impossible in any JVM language.

Konrad.


__________ Information provenant d'ESET NOD32 Antivirus, version de la base des 
signatures de virus 4942 (20100313) __________

Le message a été vérifié par ESET NOD32 Antivirus.

http://www.eset.com


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