> That's not even an API change -- it's a compiler change. An improved
> API behavior would be making nth work on sorted-sets and sorted-maps.
> ;)
True, I guess -- even though, with a LISP it's not obvious where API
ends and language starts -- (let) is, after all, a clojure.core
macro :)
--
You
On Wed, Feb 16, 2011 at 3:36 AM, Marko Topolnik
wrote:
>> HOFs and
>> lazy seqs add a bit more expense. Try deliberately throwing an
>> exception in lazy-seq and then (first (map this (map that ...
>> (my-exception-throwing-lazy-seq and see how deep the stack trace
>> nests; the method call ov
> HOFs and
> lazy seqs add a bit more expense. Try deliberately throwing an
> exception in lazy-seq and then (first (map this (map that ...
> (my-exception-throwing-lazy-seq and see how deep the stack trace
> nests; the method call overheads do add up when there's many of them!
Tell me about i
On Tue, Feb 15, 2011 at 10:02 AM, Marko Topolnik
wrote:
>> > Is really any call that isn't inlined that expensive?
>>
>> Yes, unfortunately. You saw the numbers. :)
>
> If you mean the earlier thread about the Euler problem, I see that the
> diagonal-sum-3 drastically outperforms diagonal-sum-2 by
> > Is really any call that isn't inlined that expensive?
>
> Yes, unfortunately. You saw the numbers. :)
If you mean the earlier thread about the Euler problem, I see that the
diagonal-sum-3 drastically outperforms diagonal-sum-2 by eliminating
HOFs and working with unchecked primitive ops. Elimi
On Tue, Feb 15, 2011 at 3:52 AM, Marko Topolnik
wrote:
>> 4. Unless you're using 1.3 or later, put the innermost loop in a
>> single function and try to avoid calling sub-functions, except for
>> operators like + that can get inlined.
>
> This is interesting, can you be more specific about this po
> 4. Unless you're using 1.3 or later, put the innermost loop in a
> single function and try to avoid calling sub-functions, except for
> operators like + that can get inlined.
This is interesting, can you be more specific about this point -- what
exactly do we need to avoid? Calls that force the
On Feb 14, 4:32 pm, cej38 wrote:
> Laziness is great when there are things that may not ever be needed.
> But it slows things down when you know that you are going to need some
> function applied to every element of some col. The doall function is
> your friend in this case.
AFAIK, most if not a
Laziness is great when there are things that may not ever be needed.
But it slows things down when you know that you are going to need some
function applied to every element of some col. The doall function is
your friend in this case.
If there are things that you are using pmap on then I would op
On Feb 13, 7:50 pm, Jarl Haggerty wrote:
> I'm shooting for 60 fps but I can barely get 10 when the box is
> falling and when it lands on the ground and the collision response
> kicks in I get about 5.
>
> The project has reached a size where I thought it would be silly to
> ask for specific way
On Sun, Feb 13, 2011 at 5:50 PM, Jarl Haggerty wrote:
> For a while I've been working on a 2D physics engine written in
> Clojure. I just recently got to the point where I can run a
> simulation(a box falling onto the ground) and it is painfully slow.
> I'm shooting for 60 fps but I can barely ge
For a while I've been working on a 2D physics engine written in
Clojure. I just recently got to the point where I can run a
simulation(a box falling onto the ground) and it is painfully slow.
I'm shooting for 60 fps but I can barely get 10 when the box is
falling and when it lands on the ground an
12 matches
Mail list logo