A tangential but related question: does J have a dictionary data type? Where can I read about it?
Thanks. On Mon, Mar 3, 2014 at 8:55 AM, Tracy Harms <kalei...@gmail.com> wrote: > My naïve intuition is that a tree of symbols would be the most direct route > to increased performance. Would that fit with what you suggested here, > Raul? > On Mar 3, 2014 1:52 AM, "Raul Miller" <rauldmil...@gmail.com> wrote: > > > We should be able to concatenate boxed arrays with somewhat better > > performance. Conceptually speaking, the added box can be treated as an > > opaque string (other than reference counting bumps) for the purpose of > the > > concatenation operation. Conceptually, also, already have some way of > > allocating memory in "power of two sized blocks". But memory management > is > > a subtle thing, so maybe there is something I am missing? > > > > Thanks, > > > > -- > > Raul > > > > > > On Mon, Mar 3, 2014 at 12:26 AM, bill lam <bbill....@gmail.com> wrote: > > > > > I would be quite happy if J can do that in a few minutes. The > > > bottle neck is not string related but J converts Json data into a > > > box array. Because concatenation of box arrays cannot be done > > > in place, it re-constructs a new box array for each node and this > > > is quadratic. > > > > > > Even if you can use python to parse json, it will still take a > > > quadratic operation to convert that parsed data structure > > > back to a J box array. Untested. > > > > > > Пн, 03 мар 2014, June Kim (김창준) писал(а): > > > > Hello, > > > > > > > > I recently tried to work on a JSON file (a bookmark file from Chrome > > > > browser), which is about 28MB. My initial attempt was using the json > > > parser > > > > from the J packages. Oh, it was slow. It took more than one minute on > > my > > > > machine. > > > > > > > > Disappointed, but I was kind of expecting the slow performance > because > > > > string and tree are not what J's strength is. > > > > > > > > Now I turned to Python and tried parsing the file using the standard > > > > package. Oh, I took about a second. > > > > > > > > So I can proceed with Python but I want to know if there are any > other > > > > options working with J with better performance. > > > > > > > > June > > > > > ---------------------------------------------------------------------- > > > > For information about J forums see > http://www.jsoftware.com/forums.htm > > > > > > -- > > > regards, > > > ==================================================== > > > GPG key 1024D/4434BAB3 2008-08-24 > > > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 > > > gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3 > > > ---------------------------------------------------------------------- > > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm