On Sun, Oct 16, 2011 at 1:51 AM, Baishampayan Ghose <b.gh...@gmail.com> wrote:
> On Sun, Oct 16, 2011 at 11:16 AM, Jestan Nirojan
> <jestanniro...@gmail.com> wrote:
>> Your solution worked, about 4x~5x improvement.
>> Thanks a lot BG.
>
> Glad that it worked for you, Jestan. Protocols are usually the right
> approach for these kind of tasks.

Why convert at all?  Java maps can be used quite conveniently in Clojure.

If it's because you need the map to be persistent, you might consider
converting each map only when the user attempts to conj or assoc,
rather than doing all the work up front.  Since those aren't (yet!)
protocols, I supposed you'd have to either use a non-standard conj and
assoc, or create a wrapper around the Java Maps.  Of course there are
complications with all three of these solutions, so you'll have to
choose carefully based on your needs.

--Chouser

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