2010/5/28 Meikel Brandmeyer <m...@kotka.de> > Hi, > > On May 27, 9:50 pm, Laurent PETIT <laurent.pe...@gmail.com> wrote: > > > But you will still have the cost of creating 2 or 3 times several > millions > > of Seq objects, even if they are quickly made GCable. > > But then: why do it in Clojure, when you need close control anyway? > I see the main benefit in Clojure in having very high-level structures > available. If their use is not feasible, why not simply drop down to > Java or Assembly or whatever? The resulting Clojure code will be just > as ugly anyway. >
Agreed. But the question was how to stick with clojure, write it the most elegantly while still being performant :) > > > The OP said that arrays will be several gigabytes in size, so even if the > > set of different docs in much less than that by an order of magnitude (or > > even 2), memoizing a million of docs and then being forced to kill the VM > > may not be an option for him ! > > Ah ok. The OP said also, that loading a new document > invalidates the previous one, which I understood as "it > releases the resources of the previous one". Buffers and > such. But you would still have references to now invalid > structures building up in the memoize cache. You are > right. > > Here the modified memoize could come in handy with a > FifoStrategy and queue size of 1. So as soon as the next > document is loaded the previous one would drop out of the > memoize cache. > > Indeed -- 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