Hi Group,Good afternoon I hope everyone is well. I just wanted to reach out to this group and get the current status of Clojure today on the LLVM compiler or C based implementation? Has anyone looked into a Julia implementation? Just trying to get a roadmap on the main forks before searching on every permutation of this question. Thanks so much for your help and valuable input of this group.--
BR_joe
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Group,Good afternoon I hope everyone is well. I just wanted to reach out to this group and get the current status of Clojure today on the LLVM compiler or C based implementation? Has anyone looked into a Julia implementation? Just trying to get a roadmap on the main forks before searching on every permutation of this question. Thanks so much for your help and valuable input of this group.
BR_joe
2013/3/28 Marko Topolnik <marko.t...@gmail.com>:
> Or you may have just a trivial requirement for a program that both starts
> and executes quickly.
To what extent would an LLVM / C version of a Clojure program not
incur startup penalty as the JVM does.
As far as I understand it, the startup cost is manyfold:
1/ JVM startup
2/ loading of Clojure Core
3/ loading of non-lazy parts of your application (generally from
loading a global namespace to invoke its -main function)
I know AOT compilation can somehow reduce load-time of 2/ and 3/, but
not bring them to zero. As far as I understand it, all the namespaces
involved in your application will still have to be linearly executed,
in a depth-first manner following the graph of namespace dependencies
+ loaded configuration files etc. Only the compilations of functions
will be optimized into loading of their corresponding classes.
So, short of having a "image-like" environment, I wonder what the time
taken to do 2/ + 3/ would be in LLVM / C versions of Clojure.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
2013/3/28 Marko Topolnik <marko.t...@gmail.com>:
> Or you may have just a trivial requirement for a program that both starts
> and executes quickly.
To what extent would an LLVM / C version of a Clojure program not
incur startup penalty as the JVM does.
As far as I understand it, the startup cost is manyfold:
1/ JVM startup
2/ loading of Clojure Core
3/ loading of non-lazy parts of your application (generally from
loading a global namespace to invoke its -main function)
I certainly don't see that. I've measured this more than a few times,
and it's several seconds for a simple "Hello World" Java application
on any machine that I can touch. Additionally, on an embedded system,
I'm not going to have the same kind of CPU power. For instance, the
current processor we use runs at 400MHz instead of your desktop's
3GHz.
On Thu, Mar 28, 2013 at 9:26 PM, Mikera <mike.r.an...@gmail.com> wrote:
> On Friday, 29 March 2013 05:45:53 UTC+8, Laurent PETIT wrote:
>>
>> 2013/3/28 Marko Topolnik <marko.t...@gmail.com>:
>> > Or you may have just a trivial requirement for a program that both
>> > starts
>> > and executes quickly.
>>
>> To what extent would an LLVM / C version of a Clojure program not
>> incur startup penalty as the JVM does.
>>
>> As far as I understand it, the startup cost is manyfold:
>> 1/ JVM startup
>> 2/ loading of Clojure Core
>> 3/ loading of non-lazy parts of your application (generally from
>> loading a global namespace to invoke its -main function)
>
> In my experience 1) is a small fraction of the total. A trivial "hello
> world" Java program runs in less than 0.1sec on my machine, which proves
> that JVM startup isn't really important. Or at least, far less important
> than most people think.
I certainly don't see that. I've measured this more than a few times,
and it's several seconds for a simple "Hello World" Java application
on any machine that I can touch. Additionally, on an embedded system,
I'm not going to have the same kind of CPU power. For instance, the
current processor we use runs at 400MHz instead of your desktop's
3GHz.
[snip]
> It might even be slower in LLVM / C, unless you can at least match the JVM
> in terms of JIT optimisation and garbage collector efficiency, which in turn
> affects the runtime for 2+3 (I believe a garbage collector is a requirement
> to execute Clojure?). Beating the JVM isn't an easy feat.
You could argue the same for any application written in C, though I
think in practice C keeps up pretty well. However, raw execution
speed isn't necessarily my goal. More interesting to me is having
better tools to use. Clojure's approach to concurrent programming is
world's better that the "share everything" approach used in C, and
it's that facility that I'd like to use the most. But requiring the
JVM to use it--in my environment--is just too high of a price to pay.
To be honest, LLVM might be too high as well. LLVM is certainly far
from small and lightweight. :-)
On Fri, Mar 29, 2013 at 5:49 AM, Mikera <mike.r.an...@gmail.com> wrote:
> I decided to benchmark JVM startup again, in case of any doubt, and because
> I see plenty of FUD on this issue.
Okay. I pushed up a barebones example of a command line application
here: https://github.com/jszakmeister/barebones
Really, it's just Clojure plus tools.cli, and a small snippet in main.
Running this 10 times, I'm seeing about 3.07s on my machine to
execute this example. I built in with "lein2 uberjar", and did:
:: time java -jar target/barebones-0.1.0-SNAPSHOT-standalone.jar
{:faux bar, :help false}
Hello, World!
java -jar target/barebones-0.1.0-SNAPSHOT-standalone.jar 3.09s user
0.28s system 186% cpu 1.804 total
:: java -version
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-10M4203)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)
Yes, you are involving Clojure startup here, which turns the tables altogether. This is far more work than just Java startup: all the namespaces must be initialized: all their def'd values calculated at runtime and assigned. Some of these may involve quite heavyweight service startup. This is the real issue in the Clojure startup story: it is not aggressively optimized towards zero startup time. It is a problem that carries over to other underlying implementations.
This is something I've thought/talked about for some time now. In reality this is one of the reasons I started Mjolnir. I would like to see an implementation of Clojure on LLVM. Mjolnir is several months away from being able to handle a project like this, but I took the time tonight to type up my thoughts on the topic.
https://github.com/halgari/clojure-metal/blob/master/README.md
I'd love to hear anyone's input on this doc. I just typed this up, so it's a bit rough, but it should communicate some of the ideas I have.
Timothy Baldridge
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Am I missing something? What are the downsides of this approach?
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I just thought about this recently, but does the value-oriented nature of clojure mostly void the need for a cycles-aware GC? It seems like you won't ever have cycles without identities, or pointers (java references). Maybe this would be a problem only when you need identities, ie deftype or defprotocol implementing objects.
--