>
>
> What's the reason for asking? If you aim for making efficient code (that 
> is running very many times in tight loops), I think most of this will be 
> inlined by the JIT, as long as it is not confused by side effects and other 
> things.


I'm asking mostly because I want to better understand the essence of how 
clojure works.  But you are right in thinking that I am also interested in 
better understanding performance implications - but this is a secondary 
reason.  Primarily, I'm just trying to understand better.

Coming from a C++ background I'm not that familiar with functions as first 
class values.  We sort of do have them in C++ - as functors - ie a class 
that has the function invocation operator defined.  This class can have 
storage as well, which means you can have a functor object type which then 
can have particular instances instantiated with different particular 
parameters stored with the object instance.

I'm wondering whether this is effectively what Clojure does under-the-hood, 
or whether it does something different / more sophisticated.
 

>
> As long as the JVM can optimize the procedure, it's of lesser importance 
> how Clojure solves it in "one-shot" scenarios.
>

In one sense yes, though it's nice to better understand what is happening 
and how this influences program performance.
 

>
> Maybe I somewhat dodge the question, but dynamic just in time compilation 
> is so mindblowing cool that an hypothesis about the quickest possible way 
> to solve the problem combined with profiling is what matters most in 
> practice.
>
> /Linus
>

-- 
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
--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to