Ahem, does it have to be as fast as Java ? The way I see it, it's the same issue we dealt with languages like Fortran, Cobol, ... At some point, the only way to speed programs was to find hot spots and replaces these with faster code, mainly written in assembler or another language suited to the process step needing optimization.
Would we code the entire app in assembly language ? No of course except for a few maniacs that were fluent in machine code. There as to be a trade off somewhere. Would you write parallel stuff in Java with all that logic needed to collect the results, insure synchronization, .. or use the (para ....) function in Clojure to use that 32 cores chip coming around the corner ? The answer is quite obvious no ? The same problem exists with Java but how many use JNI to call stuff written in another platform dependent language ? If your algorithm is single threaded and performance is a must then even Java should be tossed away. Any native machine code equivalent would be faster than Java... The balance is between sheer performance and features. If you an write ultra performant code in four time or more the number of lines it takes in Clojure then you should ask yourself if the performance gain is worth the extra maintenance, code length, .... Perf bottlenecks are being addresses in Clojure already but not a the expense of expressiveness. And that is perfectly fine... Luc On Tue, 2009-08-11 at 15:06 -0700, fft1976 wrote: > On Aug 11, 2:24 pm, tmountain <tinymount...@gmail.com> wrote: > > Well, the question posed in the subject is whether Clojure can be as > > fast as Java. > > The question was: "If you use Java's arrays and declare all types, > should Clojure be as fast as the equivalent Java?" I'm sorry if the > current subject line appears ambiguous to you. > > > Luc Préfontaine Armageddon was yesterday, today we have a real problem... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---