Your solution is very clear Meikel. I don't have a benchmark. I'm just
worried about the overhead of creating seqs. You use two map's and one
vector (which each create a seq I think). The array's will be several
gigabytes in size so it might build up.

I forgot to mention that documents can only be loaded in one at a
time. Loading a new document releases the currently loaded document.
So memoize won't quite work. But I can figure out the details myself.

Thanks for the help
  -Patrick

On May 27, 3:24 pm, Meikel Brandmeyer <m...@kotka.de> wrote:
> Hi,
>
> On Thu, May 27, 2010 at 12:07:30PM -0700, CuppoJava wrote:
> > Thanks for the help. Is there a nice efficient way of doing it with
> > loop and recur? The proposed solutions are quite expensive as written
> > as compared to the Java equivalent.
>
> No, thanks to memoize my solution does what you want. It loads
> each document only once. It short-circuits on mal-formed? (in case
> it is expensive). And it stops as soon as a mal-formed document is
> found (or the document list is exhausted).
>
> Do you have a benchmark, which shows how expensive the solutions are
> compared to the Java version?
>
> Sincerely
> Meikel

-- 
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

Reply via email to