As long as we're fixing d.c.json... it would be nice to add support for encoding sequences and maps. (I know, I should open a bug....) --That would be http://dev.clojure.org/jira/browse/DJSON-1 which I opened at the end of July...On Fri, Oct 7, 2011 at 11:10 AM, Lars Nilsson <chamael...@gmail.com> wrote:Trying to be a little bit constructive here, in case I come across as complaining, I took the source for c.d.json and put it into a leiningen project, enabled warn on reflection, and found that several cases of (... (let [c (char i] ... (= c \x) ...) results in Clojure deciding it needs to perform reflection in order to call equals in the comparison with a fixed character. I'm not really sure what the proper solution for this is, but I changed the "let" to (let [c (Character/valueOf (char i)] ...) and the time for my 217KB JSON file dropped from 107 seconds to 2 seconds, or only a little more than twice as slow as clj-json (which clocked in a little under one second for my file). 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 |
- Re: Faster JSON library Dave Sann
- Re: Faster JSON library Chas Emerick
- Re: Faster JSON library kovas boguta
- Re: Faster JSON library Lars Nilsson
- Re: Faster JSON library Stuart Halloway
- Re: Faster JSON library Stuart Halloway
- Re: Faster JSON library Kevin Downey
- Re: Faster JSON library Lars Nilsson
- Re: Faster JSON library Lars Nilsson
- Re: Faster JSON library Sean Corfield
- Re: Faster JSON library Tal Liron
- Re: Faster JSON library Sean Corfield
- Re: Faster JSON library Lars Nilsson
- Re: Faster JSON library Stuart Sierra
- Re: Faster JSON library Stuart Sierra