[{"data":1,"prerenderedAt":265},["ShallowReactive",2],{"project-7501891":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":41,"post_text":43,"what":44,"said":64,"maker_in_thread":130,"shape":132,"grid":137,"attempts":226,"same_week":227,"maker_shows":38,"maker_hidden":258,"reader_version":259,"card":260},"7501891","ffjson","faster json serialization in Go","title","Show HN: ffjson: faster json serialization in Go","https:\u002F\u002Fjournal.paul.querna.org\u002Farticles\u002F2014\u002F03\u002F31\u002Fffjson-faster-json-in-go\u002F","journal.paul.querna.org","pquerna",1396278390,2014,83,35,352,2272,16,"notable","languages","serialization library","library",[24,25,26,27],"go json","json serialization","golang","code generation","curious",-0.15,{"positive":31,"neutral":32,"mixed":33,"critical":34},1,4,0,3,8,{"execution":37,"idea":39,"performance":40},{"positive":33,"critical":38},2,{"positive":31,"critical":33},{"positive":33,"critical":31},[33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,31,33,34,31,33,33,33,34,42,33,33,33,34,31,34],5,null,{"problem":45,"audience":43,"pricing":43,"motivation":43,"time_to_build":43,"stack":57,"openness":63,"stage":63,"team_size":63},{"value":46,"source":47,"evidence":48},"Slow JSON serialization in Go","inferred",[49,53],{"id":50,"by":51,"text":52},"7502636","hierro","This is way more complicated that it needs to be. Use code.google.com\u002Fp\u002Fgo.tools\u002Fgo\u002Ftypes to process the AST and you'll get basically the same information that the compiler sees.…",{"id":54,"by":55,"text":56},"7502234","hannibalhorn","The implementation of this is pretty interesting, in that it generates code that imports your code, compiles it, and then uses reflection to generate the serialization code. And…",[58],{"value":59,"source":47,"evidence":60},"Go",[61],{"id":62},"post","unknown",{"praise":65,"objections":74,"requests":90,"questions":98,"alternatives":104},[66],{"value":67,"source":68,"evidence":69},"Generating schema-specific code is faster than generic code","commenter",[70],{"id":71,"by":72,"text":73},"7502419","haberman","As someone who has been working on parsing\u002Fserialization for many years, I can absolutely confirm that generating schema-specific code will beat generic code almost every time.…",[75,83],{"value":76,"source":68,"evidence":77},"Code generation adds a compile step and is less convenient",[78,79],{"id":71,"by":72,"text":73},{"id":80,"by":81,"text":82},"7504991","alecthomas","Nice hack (in the hacker sense), but not exactly convenient.",{"value":84,"source":68,"evidence":85},"Generated code tooling should not need reflection",[86],{"id":87,"by":88,"text":89},"7502316","lucian1900","If anything, that would be an indication that the tooling is nowhere near good enough. Any reflection should be doable entirely with data the compiler has anyway.",[91],{"value":92,"source":68,"evidence":93},"Optionally emit key-sorted canonical JSON",[94],{"id":95,"by":96,"text":97},"7503470","otterley","Good stuff, there. Feature request: optionally emit canonicalized (key-sorted) JSON.",[99],{"value":100,"source":68,"evidence":101},"Whether reflection-based approaches are needed at all",[102,103],{"id":54,"by":55,"text":56},{"id":87,"by":88,"text":89},[105,112,116,123],{"value":106,"source":68,"evidence":107},"encoding\u002Fjson with reflection",[108],{"id":109,"by":110,"text":111},"7502353","knodi","This is a good example of why everyone should avoid using reflect package as much as possible. I use reflect for quick development and then remove it before production roll out.",{"value":113,"source":68,"evidence":114},"Cap'n Proto",[115],{"id":71,"by":72,"text":73},{"value":117,"source":68,"evidence":118},"Rust serialize macros",[119],{"id":120,"by":121,"text":122},"7502811","pcwalton","> The article discovers an important tradeoff: speed vs. convenience. Generated code is faster but less convenient, because it adds steps to your compile. Rust's approach to…",{"value":124,"source":68,"evidence":125},"fatherhood",[126],{"id":127,"by":128,"text":129},"7504205","AYBABTME","I've made a library this weekend that doesn't need code generation to achieve 2x improvement[1] over the standard library. While the OP only implemented the encoding part, I only…",{"comments":33,"answered":33,"key":131},[],{"commenters":133,"max_depth":134,"maker_replies":33,"first_comment_mins":135,"lifespan_hours":136},22,10,50,28,[138,140,144,146,148,149,151,153,155,157,159,162,164,166,169,171,174,177,179,182,185,187,190,192,193,197,199,200,204,209,213,216,218,221,223],[71,33,33,139,72,33],"other\u002Fneutral\u002Fidea",[141,33,33,142,143,33],"7502745","commenter\u002Fneutral\u002Fnone","throwaway812",[145,33,33,142,72,33],"7503289",[147,33,33,142,143,33],"7508162",[120,33,33,139,121,33],[150,33,33,142,72,33],"7503267",[152,33,33,139,121,33],"7503489",[154,33,33,142,72,33],"7503893",[156,33,33,139,121,33],"7504201",[158,33,33,139,72,33],"7504491",[160,33,33,161,121,33],"7504833","other\u002Fneutral\u002Fnone",[163,33,33,161,72,33],"7505504",[165,33,33,161,121,33],"7510884",[167,33,33,139,168,33],"7503765","p0nce",[170,33,33,139,121,33],"7504229",[172,33,33,139,173,33],"7505274","duaneb",[175,33,33,139,176,33],"7504443","dwrensha",[178,33,33,139,72,33],"7504562",[180,33,33,139,181,33],"7503645","densh",[183,33,33,139,184,33],"7504177","thomasahle",[50,31,31,186,51,33],"project\u002Fcritical\u002Fexecution",[188,38,33,161,189,33],"7502648","chimeracoder",[54,34,34,191,55,33],"project\u002Fneutral\u002Fexecution",[87,34,31,186,88,33],[194,34,33,195,196,33],"7502425","other\u002Fneutral\u002Fexecution","timtadh",[198,34,33,195,51,33],"7502684",[127,32,33,139,128,33],[201,42,34,202,203,33],"7502892","project\u002Fneutral\u002Fnone","United857",[205,206,42,207,208,33],"7502341",6,"project\u002Fpositive\u002Fidea","kevrone",[210,211,33,139,212,33],"7502834",7,"mwsherman",[214,35,33,195,215,33],"7504806","eikenberry",[80,35,33,217,81,33],"commenter\u002Fcritical\u002Fexecution",[95,219,34,220,96,33],9,"project\u002Fneutral\u002Fidea",[109,134,31,222,110,33],"project\u002Fcritical\u002Fperformance",[224,134,34,191,225,33],"7502391","Dobbs",[],[228,233,238,243,248,253],{"id":229,"name":230,"points":231,"category":232},"7487935","VoxelQuest",435,"games",{"id":234,"name":235,"points":236,"category":237},"7501516","SlideRule",368,"learning_science",{"id":239,"name":240,"points":241,"category":242},"7508443","Deafalarm",170,"consumer_social",{"id":244,"name":245,"points":246,"category":247},"7518564","Notifon",129,"hardware",{"id":249,"name":250,"points":251,"category":252},"7502999","GridList",92,"dev_tools",{"id":254,"name":255,"points":256,"category":257},"7491003","Route Optimization API",70,"web_saas",false,"v2",{"id":261,"name":5,"line":6,"ai":258,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":29,"top":18,"kw":262,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":263,"url":9,"mix":264,"praise":67,"objection":76,"sub":21},7501891,[24,25,26,27],"00000000000000000000103100035000313",[31,32,33,34],1793990904210]