Let's name these two results 'r1' and 'r2' r1=r2 0 $r1
$r2 $&.>r1 ┌─┐ │1│ └─┘ $&.>r2 ┌┐ ││ └┘ R1=:{.>r1 R2=:{.>r2 R1-:R2 1 In other words, while the contents are the same they are wrapped slightly differently. Thanks, -- Raul On Mon, Mar 17, 2014 at 12:10 AM, June Kim (김창준) <junea...@gmail.com> wrote: > Hi > > Thanks Bill. And sorry for my delayed reply. BTW, I am cross-posting this > to the J programming mailing list, for the people who are interested in the > follow-up. > > I've ran your version of json against the standard package version and the > standard pure python json module. Your version is faster but takes larger > memory, but the result is not exactly the same(more on this at the end). > > The standard version: > > bm=. 1!:1 <'Bookmarks' > ts=: 6!:2,7!:2@] > ts 'dec_json bm' > 66.3499 5.36879e8 > > The new version you provided: > > ts 'dec_json bm' > 34.6758 1.36445e9 > > The standard pure python version: > > 0.4986 75272192 > > In J, the standard json and the new version you provided resulted in > different output. > > newresult -: oldresult > 0 > > Yet, the enc_json'd result seems to be the same. > > newresult -:&enc_json standardresult > 1 > > However, the resulted J representation is different. I just sampled one > difference -- I am not sure if it could help. > > > 3!:3 (((<1 0) {>@(1 {>@((<1 0){ >@((<1 1) { >@((<1 1){])))))) > standardresult > e300000000000000 > 2000000000000000 > 0100000000000000 > 0000000000000000 > 2800000000000000 > e300000000000000 > 2000000000000000 > 0100000000000000 > 0100000000000000 > 0100000000000000 > 3000000000000000 > e300000000000000 > 2000000000000000 > 0c00000000000000 > 0200000000000000 > 0200000000000000 > 0600000000000000 > 9000000000000000 > c800000000000000 > f800000000000000 > 2801000000000000 > 7001000000000000 > a001000000000000 > d001000000000000 > 1002000000000000 > 4002000000000000 > 9002000000000000 > c002000000000000 > f002000000000000 > e300000000000000 > 0200000000000000 > 0a00000000000000 > 0100000000000000 > 0a00000000000000 > 646174655f616464 > 6564000000000000 > e300000000000000 > 0200000000000000 > 0200000000000000 > 0100000000000000 > 0200000000000000 > 6964000000000000 > e300000000000000 > 0200000000000000 > 0400000000000000 > 0100000000000000 > 0400000000000000 > 6e616d6500000000 > e300000000000000 > 0200000000000000 > 1800000000000000 > 0100000000000000 > 1800000000000000 > 73796e635f747261 > 6e73616374696f6e > 5f76657273696f6e > 0000000000000000 > e300000000000000 > 0200000000000000 > 0400000000000000 > 0100000000000000 > 0400000000000000 > 7479706500000000 > e300000000000000 > 0200000000000000 > 0300000000000000 > 0100000000000000 > 0300000000000000 > 75726c0000000000 > e300000000000000 > 0200000000000000 > 1100000000000000 > 0100000000000000 > 1100000000000000 > 3133303031353737 > 3430313837303032 > 3100000000000000 > e300000000000000 > 0200000000000000 > 0500000000000000 > 0100000000000000 > 0500000000000000 > 3330363133000000 > e300000000000000 > 0200000000000000 > 2200000000000000 > 0100000000000000 > 2200000000000000 > ec9584eab8b02045 > 5350202d20416e64 > 726f696420eba788 > ecbc93ec9d9820ec > 95b1000000000000 > e300000000000000 > 0200000000000000 > 0400000000000000 > 0100000000000000 > 0400000000000000 > 3230343300000000 > e300000000000000 > 0200000000000000 > 0300000000000000 > 0100000000000000 > 0300000000000000 > 75726c0000000000 > e300000000000000 > 0200000000000000 > 7e00000000000000 > 0100000000000000 > 7e00000000000000 > 68747470733a2f2f > 6d61726b65742e61 > 6e64726f69642e63 > 6f6d2f6465746169 > 6c733f69643d636f > 6d2e686577697474 > 736f66742e626162 > 7926666561747572 > 653d746f702d7061 > 6964233f743d5732 > 3531624777734d53 > 77794c4449774e69 > 7769593239744c6d > 686c64326c306448 > 4e765a6e5175596d > 466965534a640000 > > 3!:3 (((<1 0) {>@(1 {>@((<1 0){ >@((<1 1) { >@((<1 1){])))))) newresult > e300000000000000 > 2000000000000000 > 0100000000000000 > 0000000000000000 > 2800000000000000 > e300000000000000 > 2000000000000000 > 0100000000000000 > 0000000000000000 > 2800000000000000 > e300000000000000 > 2000000000000000 > 0c00000000000000 > 0200000000000000 > 0200000000000000 > 0600000000000000 > 9000000000000000 > c800000000000000 > f800000000000000 > 2801000000000000 > 7001000000000000 > a001000000000000 > d001000000000000 > 1002000000000000 > 4002000000000000 > 9002000000000000 > c002000000000000 > f002000000000000 > e300000000000000 > 0200000000000000 > 0a00000000000000 > 0100000000000000 > 0a00000000000000 > 646174655f616464 > 6564000000000000 > e300000000000000 > 0200000000000000 > 0200000000000000 > 0100000000000000 > 0200000000000000 > 6964000000000000 > e300000000000000 > 0200000000000000 > 0400000000000000 > 0100000000000000 > 0400000000000000 > 6e616d6500000000 > e300000000000000 > 0200000000000000 > 1800000000000000 > 0100000000000000 > 1800000000000000 > 73796e635f747261 > 6e73616374696f6e > 5f76657273696f6e > 0000000000000000 > e300000000000000 > 0200000000000000 > 0400000000000000 > 0100000000000000 > 0400000000000000 > 7479706500000000 > e300000000000000 > 0200000000000000 > 0300000000000000 > 0100000000000000 > 0300000000000000 > 75726c0000000000 > e300000000000000 > 0200000000000000 > 1100000000000000 > 0100000000000000 > 1100000000000000 > 3133303031353737 > 3430313837303032 > 3100000000000000 > e300000000000000 > 0200000000000000 > 0500000000000000 > 0100000000000000 > 0500000000000000 > 3330363133000000 > e300000000000000 > 0200000000000000 > 2200000000000000 > 0100000000000000 > 2200000000000000 > ec9584eab8b02045 > 5350202d20416e64 > 726f696420eba788 > ecbc93ec9d9820ec > 95b1000000000000 > e300000000000000 > 0200000000000000 > 0400000000000000 > 0100000000000000 > 0400000000000000 > 3230343300000000 > e300000000000000 > 0200000000000000 > 0300000000000000 > 0100000000000000 > 0300000000000000 > 75726c0000000000 > e300000000000000 > 0200000000000000 > 7e00000000000000 > 0100000000000000 > 7e00000000000000 > 68747470733a2f2f > 6d61726b65742e61 > 6e64726f69642e63 > 6f6d2f6465746169 > 6c733f69643d636f > 6d2e686577697474 > 736f66742e626162 > 7926666561747572 > 653d746f702d7061 > 6964233f743d5732 > 3531624777734d53 > 77794c4449774e69 > 7769593239744c6d > 686c64326c306448 > 4e765a6e5175596d > 466965534a640000 > > > On Tue, Mar 4, 2014 at 12:40 PM, bill lam <bbill....@gmail.com> wrote: > > > June, > > > > I changed json decoder to avoid intermediate box contenation, the > > trade-off might be a much larger space requirement. Please test > > its performance, the space requirement, and will the result be > > correct. > > > > Thanks. > > > > -- > > 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