JSOND:一个更优的PHPJSON解析器
首先,我们先来看看性能测试数据:
01STR:{"i":23, "array":[1,null,false,true,["aha", "baba",23,{"test":23}]]}02JSON: timefor100000iterations:0.23832103JSOND:timefor100000iterations:0.2364360405STR:[1,2,3,4,5,6,7,8,9,10]06JSON: timefor100000iterations:0.11076407JSOND:timefor100000iterations:0.1342120809STR:{"a":23.2234232}10JSON: timefor100000iterations:0.07845811JSOND:timefor100000iterations:0.0554791213STR:{"long-str": "Atveroeosetaccusamusetiustoodiodignissimosducimusquiblanditiispraesentiumvoluptatumdelenitiatquecorruptiquosdoloresetquasmolestiasexcepturisintoccaecaticupiditatenonprovident,similiquesuntinculpaquiofficiadeseruntmollitiaanimi,idestlaborumetdolorumfuga.Etharumquidemrerumfacilisestetexpeditadistinctio.Namliberotempore,cumsolutanobisesteligendioptiocumquenihilimpeditquominusidquodmaximeplaceatfacerepossimus,omnisvoluptasassumendaest,omnisdolorrepellendus.Temporibusautemquibusdametautofficiisdebitisautrerumnecessitatibussaepeevenietutetvoluptatesrepudiandaesintetmolestiaenonrecusandae.Itaqueearumrerumhicteneturasapientedelectus,utautreiciendisvoluptatibusmaioresaliasconsequaturautperferendisdoloribusasperioresrepellat.",}14JSON: timefor100000iterations:0.88142915JSOND:timefor100000iterations:0.11852916
评论