On Aug 4, 8:12 am, Boris Mizhen - 迷阵 <bo...@boriska.com> wrote:
> You are suggesting creating mutable boxed numbers with an object pool.
>
> You might want to do this with a custom classes, not a one-element
> array, because you want to be able to tell if this is your hack or
> just someone is passing a one-element array ...
Agreed. My brain decided to tell me about that idea 20 seconds after
I posted :)
>
> > Once the threadlocal cache is of sufficient size (I *think* the
> > largest it ever needs to grow is the largest number of primitives in
> > any method signature),
>
> I don't think this is true if you take closures into account.
I hadn't thought about closures. I can see how closures can increase
the number of primitive holder objects but I don't see that they
inviolate the approach. It's possible that closures would explode the
size of the object pool to such a degree that the idea collapses under
its own weight...
>
> This approach would also add complexity to functions that are supposed
> to work for any object, they might have to treat the custom objects
> differently ...
>
> Boris
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---