On Friday, February 22, 2013 8:44:30 PM UTC+1, Marko Topolnik wrote:
>
>  
>
>> * implement efficient tuple type which uses mutation for multiple value 
>> return
>>
>
> Basically, this is the ^:unsynchronized-mutable that we just mentioned :) 
> This is much better, but still it's not stack-based, so incurs the cost of 
> allocation and GC.
>

Forgot to mention another hugely important factor: heap-allocated objects 
spell disaster for CPU cachelines. With today's architectures the 
difference between a cache hit and a cache miss is like the difference 
between catching your bus to work and having to walk instead. In our 
example I would have to be careful to reuse the same deftype instance for 
all inner loop runs, but then I'd need even more code to make sure the 
values are reset before entering. The result would be messy, brittle code 
with higher-level logic scattered between all the housekeeping constructs.

-- 
-- 
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/groups/opt_out.


Reply via email to