4 ms·
If I am not mistaken, any JVM language that has immutable data structures and closures is probably going to generate a fair bit of garbage. I believe this also
by daniel_solano 14y ago
If I am not mistaken, any JVM language that has immutable data structures and closures is probably going to generate a fair bit of garbage. I believe this also applies to using Scala functionally.
My understanding is that there is greater interest in making Clojure more suitable as a library and with a leaner runtime requirement. If you have a situation were you don't need a dynamic environment, having the option to compile functions to static methods instead of classes should result in a big performance increase.
I have only briefly looked at Kawa Scheme, but I have not had the time to do much with it beyond a "Hello, World!" sort of project. Mirah is another interesting option. It uses a Ruby-inspired syntax but requires no runtime library.
- lucian1900 14y agoYes, immutable data will generate garbage. The problem with Clojure is that it generates a ton of garbage during start up, which isn't the case with Scala. I certainly welcome any improvements in Clojure. I've looked at Mirah, but it's quite immature and has serious problems with Java generics because of Java's type erasure.