Lisps are not inherently slow. SBCL, Clojure and several Schemes are
all much faster than most popular high-level languages (e.g. Python,
Perl, Ruby...) while being at least as high-level.

Optimized code in SBCL may only be marginally slower than C when type
declarations are used properly. The code is usually littered with type
declarations and just as unsafe as C (things like integer overflows
become possible, while Lisp would ordinarily promote an int to a
bigint automatically). The nice thing is that you usually only have to
do this to the inner loops. All the glue code can be written in
potentially slow, but highly abstract idiomatic Lisp. This is similar
to a common idiom in the C world, where a scripting language like Lua
is embedded to make writing the parts that aren't speed-critical
easier.

Clojure, at best should be about as fast as Java, if you use type
hints and unchecked math. A good Common Lisp will probably be slightly
faster. Stalin, a highly-optimized subset of Scheme may be even
faster.

There's no magic number of cores where Clojure becomes faster than C+
+. If your C++ code is parallel and well-written, it will probably
always be faster than Clojure. If your current code is single-
threaded, but parallelizable and you have an 8-core machine, you might
get faster results merely by using one of the operations from
clojure.parallel.
--~--~---------~--~----~------------~-------~--~----~
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
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