.nth is a method call, nth is a function call. Another perf thing.

In anycase if you're looking for examples of everyday Clojure it's best to
look elsewhere :) fast Clojure tends to look a bit quirky and relies on
details of the current state of the compiler.



On Thu, May 16, 2013 at 4:15 PM, Pavel Prokopenko <
[email protected]> wrote:

> Thanks, David!
>
> What about (.nth this i) vs (nth this i)? Is that also some optimization
> trick like direct object's method call vs reflection method call?
>
>
> On Thursday, May 16, 2013 10:34:16 PM UTC+3, David Nolen wrote:
>>
>> It is necessary - integer literals default to primitive long and I'm not
>> sure if >= will inline if it doesn't have type information in scope. This
>> bit of noise could probably be removed by improving type inference in the
>> compiler.
>>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to