Repository: only-cliches/NoProto
Branch: master
Commit: 827ebb964480
Files: 475
Total size: 157.8 MB
Directory structure:
gitextract_swrs5c9q/
├── .gitignore
├── .idea/
│ ├── .gitignore
│ ├── NoProto.iml
│ ├── modules.xml
│ └── vcs.xml
├── LICENSE
├── README.md
├── bench/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── bench.fbs
│ ├── bench_fb.rs
│ ├── bench_pb.proto
│ ├── bench_pb.rs
│ ├── main.rs
│ ├── run_bench_abomonation.rs
│ ├── run_bench_avro.rs
│ ├── run_bench_bincode.rs
│ ├── run_bench_bson.rs
│ ├── run_bench_flatbuffers.rs
│ ├── run_bench_flexbuffers.rs
│ ├── run_bench_json.rs
│ ├── run_bench_messagepack.rs
│ ├── run_bench_messagepack_rs.rs
│ ├── run_bench_no_proto.rs
│ ├── run_bench_postcard.rs
│ ├── run_bench_prost.rs
│ ├── run_bench_protocol_buffers.rs
│ ├── run_bench_rawbson.rs
│ ├── run_bench_rkyv.rs
│ └── run_bench_serde_json.rs
├── examples/
│ └── quick.rs
├── idl.graphql
├── no_proto_js/
│ ├── Cargo.toml
│ ├── out.txt
│ └── src/
│ ├── buffer.rs
│ ├── collection/
│ │ ├── list.rs
│ │ ├── map.rs
│ │ ├── mod.rs
│ │ ├── table.rs
│ │ └── tuple.rs
│ ├── error.rs
│ ├── format.rs
│ ├── hashmap.rs
│ ├── json_flex.rs
│ ├── lib.rs
│ ├── lib_wasm.rs
│ ├── memory.rs
│ ├── pointer/
│ │ ├── any.rs
│ │ ├── bool.rs
│ │ ├── bytes.rs
│ │ ├── date.rs
│ │ ├── dec.rs
│ │ ├── geo.rs
│ │ ├── mod.rs
│ │ ├── numbers.rs
│ │ ├── option.rs
│ │ ├── string.rs
│ │ ├── ulid.rs
│ │ └── uuid.rs
│ ├── rpc.rs
│ ├── schema.rs
│ └── utils.rs
├── no_proto_rs/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── modules.xml
│ │ ├── no_proto_rs.iml
│ │ └── vcs.xml
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── buffer/
│ │ └── mod.rs
│ ├── collection/
│ │ ├── list.rs
│ │ ├── map.rs
│ │ ├── mod.rs
│ │ ├── struc.rs
│ │ └── tuple.rs
│ ├── error.rs
│ ├── format.rs
│ ├── json_flex.rs
│ ├── lib.rs
│ ├── map.rs
│ ├── memory.rs
│ ├── pointer/
│ │ ├── any.rs
│ │ ├── bool.rs
│ │ ├── bytes.rs
│ │ ├── date.rs
│ │ ├── dec.rs
│ │ ├── geo.rs
│ │ ├── mod.rs
│ │ ├── numbers.rs
│ │ ├── option.rs
│ │ ├── portal.rs
│ │ ├── string.rs
│ │ ├── ulid.rs
│ │ ├── union.rs
│ │ └── uuid.rs
│ ├── schema/
│ │ ├── args.rs
│ │ ├── ast.rs
│ │ ├── mod.rs
│ │ ├── parser.rs
│ │ └── tests.rs
│ ├── types.rs
│ ├── utils.rs
│ └── values/
│ └── mod.rs
└── no_proto_rs_old/
├── .idea/
│ ├── .gitignore
│ ├── modules.xml
│ ├── no_proto_rs.iml
│ └── vcs.xml
├── CHANGELOG.md
├── Cargo.toml
├── README.md
├── src/
│ ├── buffer.rs
│ ├── collection/
│ │ ├── list.rs
│ │ ├── map.rs
│ │ ├── mod.rs
│ │ ├── struc.rs
│ │ └── tuple.rs
│ ├── error.rs
│ ├── format.rs
│ ├── hashmap.rs
│ ├── idl.rs
│ ├── json_flex.rs
│ ├── lib.rs
│ ├── memory.rs
│ ├── new_idl.rs
│ ├── pointer/
│ │ ├── any.rs
│ │ ├── bool.rs
│ │ ├── bytes.rs
│ │ ├── date.rs
│ │ ├── dec.rs
│ │ ├── geo.rs
│ │ ├── mod.rs
│ │ ├── numbers.rs
│ │ ├── option.rs
│ │ ├── portal.rs
│ │ ├── string.rs
│ │ ├── ulid.rs
│ │ ├── union.rs
│ │ └── uuid.rs
│ ├── rpc.rs
│ ├── schema.rs
│ └── utils.rs
└── target/
├── .rustc_info.json
├── CACHEDIR.TAG
├── debug/
│ ├── .cargo-lock
│ ├── .fingerprint/
│ │ ├── no_proto-087b92dbcadb4e9e/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-1f12470dc8aab137/
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-2620c8dfffee77c5/
│ │ │ ├── invoked.timestamp
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-2b9c306cf5e321b2/
│ │ │ └── invoked.timestamp
│ │ ├── no_proto-3cb4c0b2e234d1a3/
│ │ │ └── invoked.timestamp
│ │ ├── no_proto-42633ea97bf6e77b/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-441091bf4a4eb675/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-45445c9cceb28ae6/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-56746ab113abb4bf/
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-7ecb4680266c38b6/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-8d483704a5a1fdf6/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-aa3c6589db10b605/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-ae791f23982352cd/
│ │ │ ├── invoked.timestamp
│ │ │ └── output-test-lib-no_proto
│ │ ├── no_proto-ba940134b4c1a3ac/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-c73899fa9d5a4e2e/
│ │ │ ├── invoked.timestamp
│ │ │ └── output-test-lib-no_proto
│ │ ├── no_proto-d8cf3dffddd77550/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ └── no_proto-efe2ce7d02f8f240/
│ │ ├── dep-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── lib-no_proto
│ │ └── lib-no_proto.json
│ └── deps/
│ ├── libno_proto-2b9c306cf5e321b2.rmeta
│ ├── libno_proto-3cb4c0b2e234d1a3.rmeta
│ ├── libno_proto-aa3c6589db10b605.rmeta
│ ├── libno_proto-efe2ce7d02f8f240.rmeta
│ ├── no_proto-087b92dbcadb4e9e.d
│ ├── no_proto-1f12470dc8aab137.d
│ ├── no_proto-2620c8dfffee77c5.d
│ ├── no_proto-2b9c306cf5e321b2.d
│ ├── no_proto-3cb4c0b2e234d1a3.d
│ ├── no_proto-42633ea97bf6e77b.d
│ ├── no_proto-441091bf4a4eb675.d
│ ├── no_proto-45445c9cceb28ae6.d
│ ├── no_proto-56746ab113abb4bf.d
│ ├── no_proto-7ecb4680266c38b6.d
│ ├── no_proto-8d483704a5a1fdf6.d
│ ├── no_proto-aa3c6589db10b605.d
│ ├── no_proto-ae791f23982352cd.d
│ ├── no_proto-ba940134b4c1a3ac.d
│ ├── no_proto-c73899fa9d5a4e2e.d
│ ├── no_proto-d8cf3dffddd77550.d
│ └── no_proto-efe2ce7d02f8f240.d
├── package/
│ ├── no_proto-0.9.60/
│ │ ├── .cargo_vcs_info.json
│ │ ├── CHANGELOG.md
│ │ ├── Cargo.toml
│ │ ├── Cargo.toml.orig
│ │ ├── README.md
│ │ ├── src/
│ │ │ ├── buffer.rs
│ │ │ ├── collection/
│ │ │ │ ├── list.rs
│ │ │ │ ├── map.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── struc.rs
│ │ │ │ └── tuple.rs
│ │ │ ├── error.rs
│ │ │ ├── format.rs
│ │ │ ├── hashmap.rs
│ │ │ ├── idl.rs
│ │ │ ├── json_flex.rs
│ │ │ ├── lib.rs
│ │ │ ├── memory.rs
│ │ │ ├── pointer/
│ │ │ │ ├── any.rs
│ │ │ │ ├── bool.rs
│ │ │ │ ├── bytes.rs
│ │ │ │ ├── date.rs
│ │ │ │ ├── dec.rs
│ │ │ │ ├── geo.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── numbers.rs
│ │ │ │ ├── option.rs
│ │ │ │ ├── portal.rs
│ │ │ │ ├── string.rs
│ │ │ │ ├── ulid.rs
│ │ │ │ ├── union.rs
│ │ │ │ └── uuid.rs
│ │ │ ├── rpc.rs
│ │ │ ├── schema.rs
│ │ │ └── utils.rs
│ │ └── target/
│ │ ├── .rustc_info.json
│ │ ├── CACHEDIR.TAG
│ │ └── debug/
│ │ ├── .cargo-lock
│ │ ├── .fingerprint/
│ │ │ └── no_proto-d6c73808cf700296/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ └── lib-no_proto.json
│ │ ├── deps/
│ │ │ ├── libno_proto-d6c73808cf700296.rlib
│ │ │ ├── libno_proto-d6c73808cf700296.rmeta
│ │ │ └── no_proto-d6c73808cf700296.d
│ │ ├── incremental/
│ │ │ └── no_proto-3qu5d9195s2fa/
│ │ │ └── s-fx3rzdmmjm-18bks5k-2wqptzkhpfymz/
│ │ │ ├── 100zvx8sqgms7yao.o
│ │ │ ├── 11iag95g9k1r5eyg.o
│ │ │ ├── 11tt942yw3gl6w6j.o
│ │ │ ├── 11ubkt5vvp9qbq43.o
│ │ │ ├── 11vzpm5hf9bu8ymh.o
│ │ │ ├── 12n00tmiwnwxw4x5.o
│ │ │ ├── 12pwx2d3uqq2r7o3.o
│ │ │ ├── 13dgwjju0yyewxmu.o
│ │ │ ├── 14ro4lhdo34go3qh.o
│ │ │ ├── 14uydr737kwwqz1q.o
│ │ │ ├── 15bz6fbntl54m71v.o
│ │ │ ├── 15mh39nwjbcwzr96.o
│ │ │ ├── 17egp2whd2dugblv.o
│ │ │ ├── 18yyw1f532xcx611.o
│ │ │ ├── 1a6vq3jdbzpyqqzz.o
│ │ │ ├── 1bc3iz38mizgeurh.o
│ │ │ ├── 1bdkg9t4p7aa49mg.o
│ │ │ ├── 1cv9jk54xzbnkwwe.o
│ │ │ ├── 1gr7eaghjq6kh66w.o
│ │ │ ├── 1h9is57o6ueyr5yf.o
│ │ │ ├── 1hr8wozsrc0odsce.o
│ │ │ ├── 1kqemq46qhw91gde.o
│ │ │ ├── 1mm6jxl26kv2w5w.o
│ │ │ ├── 1oymp58xviu6kmdu.o
│ │ │ ├── 1p4tcqfz5qu64k1n.o
│ │ │ ├── 1tgdp93nk518p6lb.o
│ │ │ ├── 1u5en7gmon0stbjq.o
│ │ │ ├── 1uk09aus98x1fcdw.o
│ │ │ ├── 1zmfcdjd6gq5f76m.o
│ │ │ ├── 1zp47p9gvxkhg8rm.o
│ │ │ ├── 2041j4rd2c9vdtto.o
│ │ │ ├── 21x8hkxtjr93ocqa.o
│ │ │ ├── 22ksb9qfaojzkllm.o
│ │ │ ├── 23mytnugnofvpc1k.o
│ │ │ ├── 24g6fdg97fut59vz.o
│ │ │ ├── 25kqzwyxydzzmmfc.o
│ │ │ ├── 26rbdnzkddcfjn80.o
│ │ │ ├── 26z5s3uj6mgqu27o.o
│ │ │ ├── 273mtih8297mnhl.o
│ │ │ ├── 29rn58rlaxsmsdhh.o
│ │ │ ├── 2d92zzp7r2f2srg5.o
│ │ │ ├── 2h8memxx5w2ab8xa.o
│ │ │ ├── 2hzk6pkxh20qeyvo.o
│ │ │ ├── 2let3agjhes8hszq.o
│ │ │ ├── 2m4tz6iais3g6j8b.o
│ │ │ ├── 2nbyu8u7q9z8a7yq.o
│ │ │ ├── 2o5vtcg93b721b5w.o
│ │ │ ├── 2ob9m2ejmx9ta2kw.o
│ │ │ ├── 2oyschmdm8g4u3bq.o
│ │ │ ├── 2py65dwypimh54kd.o
│ │ │ ├── 2qnpbkpws3t61kd0.o
│ │ │ ├── 2rfgf26q748w8nda.o
│ │ │ ├── 2x7m2uim8dwt9ryx.o
│ │ │ ├── 2z4qe9ekl19e0nd6.o
│ │ │ ├── 2zoqal84hc1awxga.o
│ │ │ ├── 31k2qrnb96tdgzub.o
│ │ │ ├── 33jdmgjoup032j7d.o
│ │ │ ├── 33vm7ej7323a41w3.o
│ │ │ ├── 34sbj8qjnibb5vzk.o
│ │ │ ├── 35zi6bk0xq2t2a4r.o
│ │ │ ├── 38p7zh4prhcgtpym.o
│ │ │ ├── 39gs90pwr4ahejjs.o
│ │ │ ├── 39pt1bds4zeun3zv.o
│ │ │ ├── 3aw9xzy9urdgk277.o
│ │ │ ├── 3ca4z7optpq48sgf.o
│ │ │ ├── 3cqm8mc5s3w3jwbm.o
│ │ │ ├── 3dvo9vke2xp54az4.o
│ │ │ ├── 3f4h6h5a8u4psnxj.o
│ │ │ ├── 3fidzw8bo2xkn9qk.o
│ │ │ ├── 3funw30c4u8qcptj.o
│ │ │ ├── 3gpl5n74vl16dp1l.o
│ │ │ ├── 3hr6jjpend1fbnpx.o
│ │ │ ├── 3j5v6eqri4apvf0y.o
│ │ │ ├── 3jt1l7j0355uw8y8.o
│ │ │ ├── 3oe7o7pbwk6wbcfq.o
│ │ │ ├── 3ojb2ffhbpjvxt53.o
│ │ │ ├── 3p7m31na2sy1q3i2.o
│ │ │ ├── 3powsrsng6z9nwos.o
│ │ │ ├── 3qbp8vjygwoqyuuh.o
│ │ │ ├── 3skfd8w031qa9kff.o
│ │ │ ├── 3tf22gdcijvxj3y4.o
│ │ │ ├── 3ui1enrtka3f8psq.o
│ │ │ ├── 3vfw8hbs6041fe5s.o
│ │ │ ├── 3wooguttztqa99fa.o
│ │ │ ├── 3x9u5md7ioqd1e07.o
│ │ │ ├── 3xtms7x4n7yzohz7.o
│ │ │ ├── 3y20ttprujzichlw.o
│ │ │ ├── 40hh2p17ds70ezmq.o
│ │ │ ├── 40nsve19lm6mu2h9.o
│ │ │ ├── 43db2joh49ui8n4n.o
│ │ │ ├── 45r51elk92slqab3.o
│ │ │ ├── 46qflx5rbs9omtev.o
│ │ │ ├── 4730d2pomhow1bi0.o
│ │ │ ├── 48nf0owqn4lpindz.o
│ │ │ ├── 49twenxbswx7duz3.o
│ │ │ ├── 49u03kk1zzywsaaw.o
│ │ │ ├── 4bgapmze4epxook3.o
│ │ │ ├── 4cpa7sdc6cgp7t19.o
│ │ │ ├── 4ep2v5goyyhunnwj.o
│ │ │ ├── 4gglmv630h9orj05.o
│ │ │ ├── 4h3hqc86r40b5z6e.o
│ │ │ ├── 4i606q14g552vn2l.o
│ │ │ ├── 4jclbqt2cp5gyk1i.o
│ │ │ ├── 4jw1mhh26n6aug1p.o
│ │ │ ├── 4jz9pkgivbifer3j.o
│ │ │ ├── 4mi6ryztsb1jfj0x.o
│ │ │ ├── 4mwzhnescddvwetf.o
│ │ │ ├── 4mxmeblapqty0l6p.o
│ │ │ ├── 4n1s6swmhxaydea4.o
│ │ │ ├── 4p3iqe3zrx2b52d0.o
│ │ │ ├── 4q35ka4r1s48t9pt.o
│ │ │ ├── 4r4p190yu5mccdal.o
│ │ │ ├── 4rfmo4m0kaajsqjm.o
│ │ │ ├── 4rl82w5reifn9kgp.o
│ │ │ ├── 4sdnuqssdshysvt4.o
│ │ │ ├── 4subn6gdy3a0ggvs.o
│ │ │ ├── 4trz4jwr83gq0uh0.o
│ │ │ ├── 4vjpv8hbj9h5ja0m.o
│ │ │ ├── 4x7qrrsbv2eizn8m.o
│ │ │ ├── 4y3x960eu0904pon.o
│ │ │ ├── 4y4otpmmjho1x33s.o
│ │ │ ├── 4ytyxcz7xcz75hww.o
│ │ │ ├── 4zxqm4gbs67z9dxz.o
│ │ │ ├── 54hxyp93wpr3w2xh.o
│ │ │ ├── 57hmggqjfsqr1v09.o
│ │ │ ├── 58epi6n1rcquht6l.o
│ │ │ ├── 5biabrm9k90uk13i.o
│ │ │ ├── 5c530q0vz0vjt9g4.o
│ │ │ ├── 5c692wk1ti7iqhe4.o
│ │ │ ├── 5cb1xx7shw45lknz.o
│ │ │ ├── 5cjucmbxyynp2r67.o
│ │ │ ├── 5dbl5mjj8wkpsjgf.o
│ │ │ ├── 5evzxbtdt4l764qw.o
│ │ │ ├── 5frn0tcv0iny5pki.o
│ │ │ ├── 6xxtzj7rzihpmdx.o
│ │ │ ├── d4arbz7m98pdqoh.o
│ │ │ ├── ddj6ocdj6r4403e.o
│ │ │ ├── ecne6g4n0c28n94.o
│ │ │ ├── h5cwo8s7wezxhxn.o
│ │ │ ├── hgb5w3f9ivs0xca.o
│ │ │ ├── i4kyy20hoy1k0d2.o
│ │ │ ├── kymb80dlee7p7mg.o
│ │ │ ├── ng7tjeh1zyosfsj.o
│ │ │ ├── oxm053hhs2ij6im.o
│ │ │ ├── peyndyzl8jkh94k.o
│ │ │ ├── r6z7oj1jfl0jxqt.o
│ │ │ ├── s8m0rdhqo3uso4f.o
│ │ │ ├── td46wacb1m1wq8h.o
│ │ │ ├── yq9ovk1sauo3ske.o
│ │ │ ├── z0p1vtjbuwd9uz9.o
│ │ │ └── zxwh8vegkl4qe5j.o
│ │ ├── libno_proto.d
│ │ └── libno_proto.rlib
│ └── no_proto-0.9.60.crate
└── rls/
├── .rustc_info.json
├── CACHEDIR.TAG
└── debug/
├── .cargo-lock
├── .fingerprint/
│ ├── no_proto-087b92dbcadb4e9e/
│ │ ├── dep-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── lib-no_proto
│ │ └── lib-no_proto.json
│ ├── no_proto-42633ea97bf6e77b/
│ │ ├── dep-test-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── test-lib-no_proto
│ │ └── test-lib-no_proto.json
│ ├── no_proto-441091bf4a4eb675/
│ │ ├── dep-test-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── test-lib-no_proto
│ │ └── test-lib-no_proto.json
│ ├── no_proto-45445c9cceb28ae6/
│ │ ├── dep-test-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── test-lib-no_proto
│ │ └── test-lib-no_proto.json
│ ├── no_proto-7ecb4680266c38b6/
│ │ ├── dep-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── lib-no_proto
│ │ └── lib-no_proto.json
│ ├── no_proto-8d483704a5a1fdf6/
│ │ ├── dep-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── lib-no_proto
│ │ └── lib-no_proto.json
│ ├── no_proto-aa3c6589db10b605/
│ │ ├── dep-test-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── test-lib-no_proto
│ │ └── test-lib-no_proto.json
│ └── no_proto-efe2ce7d02f8f240/
│ ├── dep-lib-no_proto
│ ├── invoked.timestamp
│ ├── lib-no_proto
│ └── lib-no_proto.json
└── deps/
├── libno_proto-aa3c6589db10b605.rmeta
├── libno_proto-efe2ce7d02f8f240.rmeta
├── no_proto-087b92dbcadb4e9e.d
├── no_proto-42633ea97bf6e77b.d
├── no_proto-441091bf4a4eb675.d
├── no_proto-45445c9cceb28ae6.d
├── no_proto-7ecb4680266c38b6.d
├── no_proto-8d483704a5a1fdf6.d
├── no_proto-aa3c6589db10b605.d
├── no_proto-efe2ce7d02f8f240.d
└── save-analysis/
├── libno_proto-087b92dbcadb4e9e.json
└── no_proto-441091bf4a4eb675.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
no_proto_rs/target
**/*.rs.bk
no_proto_rs/Cargo.lock
test.json
bench/target/**/*
no_proto_js/target/**/*
target/**/*
================================================
FILE: .idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
================================================
FILE: .idea/NoProto.iml
================================================
================================================
FILE: .idea/modules.xml
================================================
================================================
FILE: .idea/vcs.xml
================================================
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2020 Scott Lott
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
## NoProto: Flexible, Fast & Compact Serialization with RPC
[Github](https://github.com/only-cliches/NoProto) | [Crates.io](https://crates.io/crates/no_proto) | [Documentation](https://docs.rs/no_proto)
[](https://lbesson.mit-license.org/)
[](https://crates.io/crates/no_proto)
[](https://docs.rs/no_proto/latest/no_proto/)
[](https://GitHub.com/only-cliches/NoProto/stargazers/)
### Features
**Lightweight**
- Zero dependencies
- `no_std` support, WASM ready
- Most compact non compiling storage format
**Stable**
- Safely accept untrusted buffers
- Passes Miri compiler safety checks
- Panic and unwrap free
**Easy**
- Extensive Documentation & Testing
- Full interop with JSON, Import and Export JSON values
- [Thoroughly documented](https://docs.rs/no_proto/latest/no_proto/format/index.html) & simple data storage format
**Fast**
- Zero copy deserialization
- Most updates are append only
- Deserialization is incrimental
**Powerful**
- Native byte-wise sorting
- Supports recursive data types
- Supports most common native data types
- Supports collections (list, map, struct & tuple)
- Supports arbitrary nesting of collection types
- Schemas support default values and non destructive updates
- Transport agnostic [RPC Framework](https://docs.rs/no_proto/latest/no_proto/rpc/index.html).
### Why ANOTHER Serialization Format?
1. NoProto combines the **performance** of compiled formats with the **flexibilty** of dynamic formats:
**Compiled** formats like Flatbuffers, CapN Proto and bincode have amazing performance and extremely compact buffers, but you MUST compile the data types into your application. This means if the schema of the data changes the application must be recompiled to accomodate the new schema.
**Dynamic** formats like JSON, MessagePack and BSON give flexibilty to store any data with any schema at runtime but the buffers are fat and performance is somewhere between horrible and hopefully acceptable.
NoProto takes the performance advantages of compiled formats and implements them in a flexible format.
2. NoProto is a **key-value database focused format**:
**Byte Wise Sorting** Ever try to store a signed integer as a sortable key in a database? NoProto can do that. Almost every data type is stored in the buffer as byte-wise sortable, meaning buffers can be compared at the byte level for sorting *without deserializing*.
**Primary Key Management** Compound sortable keys are extremely easy to generate, maintain and update with NoProto. You don't need a custom sort function in your key-value store, you just need this library.
**UUID & ULID Support** NoProto is one of the few formats that come with first class suport for these popular primary key data types. It can easily encode, decode and generate these data types.
**Fastest Updates** NoProto is the only format that supports *all mutations* without deserializng. It can do the common database read -> update -> write operation between 50x - 300x faster than other dynamic formats. [Benchamrks](#benchmarks)
### Comparison With Other Formats
Compared to Apache Avro
- Far more space efficient
- Significantly faster serialization & deserialization
- All values are optional (no void or null type)
- Supports more native types (like unsigned ints)
- Updates without deserializng/serializing
- Works with `no_std`.
- Safely handle untrusted data.
Compared to Protocol Buffers
- Comparable serialization & deserialization performance
- Updating buffers is an order of magnitude faster
- Schemas are dynamic at runtime, no compilation step
- All values are optional
- Supports more types and better nested type support
- Byte-wise sorting is first class operation
- Updates without deserializng/serializing
- Safely handle untrusted data.
- All values are optional and can be inserted in any order.
Compared to JSON / BSON
- Far more space efficient
- Significantly faster serialization & deserialization
- Deserializtion is zero copy
- Has schemas / type safe
- Supports byte-wise sorting
- Supports raw bytes & other native types
- Updates without deserializng/serializing
- Works with `no_std`.
- Safely handle untrusted data.
Compared to Flatbuffers / Bincode
- Data types can change or be created at runtime
- Updating buffers is an order of magnitude faster
- Supports byte-wise sorting
- Updates without deserializng/serializing
- Works with `no_std`.
- Safely handle untrusted data.
- All values are optional and can be inserted in any order.
| Format | Zero-Copy | Size Limit | Mutable | Schemas | Byte-wise Sorting |
|------------------|-----------|------------|---------|----------|-------------------|
| **Runtime Libs** | | | | | |
| *NoProto* | ✓ | ~4GB | ✓ | ✓ | ✓ |
| Apache Avro | ✗ | 2^63 Bytes | ✗ | ✓ | ✓ |
| JSON | ✗ | Unlimited | ✓ | ✗ | ✗ |
| BSON | ✗ | ~16MB | ✓ | ✗ | ✗ |
| MessagePack | ✗ | Unlimited | ✓ | ✗ | ✗ |
| **Compiled Libs**| | | | | |
| FlatBuffers | ✓ | ~2GB | ✗ | ✓ | ✗ |
| Bincode | ✓ | ? | ✓ | ✓ | ✗ |
| Protocol Buffers | ✗ | ~2GB | ✗ | ✓ | ✗ |
| Cap'N Proto | ✓ | 2^64 Bytes | ✗ | ✓ | ✗ |
| Veriform | ✗ | ? | ✗ | ✗ | ✗ |
# Quick Example
```rust
use no_proto::error::NP_Error;
use no_proto::NP_Factory;
// An ES6 like IDL is used to describe schema for the factory
// Each factory represents a single schema
// One factory can be used to serialize/deserialize any number of buffers
let user_factory = NP_Factory::new(r#"
struct({ fields: {
name: string(),
age: u16({ default: 0 }),
tags: list({ of: string() })
}})
"#)?;
// create a new empty buffer
let mut user_buffer = user_factory.new_buffer(None); // optional capacity
// set the "name" field
user_buffer.set(&["name"], "Billy Joel")?;
// read the "name" field
let name = user_buffer.get::<&str>(&["name"])?;
assert_eq!(name, Some("Billy Joel"));
// set a nested value, the first tag in the tag list
user_buffer.set(&["tags", "0"], "first tag")?;
// read the first tag from the tag list
let tag = user_buffer.get::<&str>(&["tags", "0"])?;
assert_eq!(tag, Some("first tag"));
// close buffer and get internal bytes
let user_bytes: Vec = user_buffer.finish().bytes();
// open the buffer again
let user_buffer = user_factory.open_buffer(user_bytes);
// read the "name" field again
let name = user_buffer.get::<&str>(&["name"])?;
assert_eq!(name, Some("Billy Joel"));
// get the age field
let age = user_buffer.get::(&["age"])?;
// returns default value from schema
assert_eq!(age, Some(0u16));
// close again
let user_bytes: Vec = user_buffer.finish().bytes();
// we can now save user_bytes to disk,
// send it over the network, or whatever else is needed with the data
# Ok::<(), NP_Error>(())
```
## Guided Learning / Next Steps:
1. [`Schemas`](https://docs.rs/no_proto/latest/no_proto/schema/index.html) - Learn how to build & work with schemas.
2. [`Factories`](https://docs.rs/no_proto/latest/no_proto/struct.NP_Factory.html) - Parsing schemas into something you can work with.
3. [`Buffers`](https://docs.rs/no_proto/latest/no_proto/buffer/struct.NP_Buffer.html) - How to create, update & compact buffers/data.
4. [`RPC Framework`](https://docs.rs/no_proto/latest/no_proto/rpc/index.html) - How to use the RPC Framework APIs.
5. [`Data & Schema Format`](https://docs.rs/no_proto/latest/no_proto/format/index.html) - Learn how data is saved into the buffer and schemas.
## Benchmarks
While it's difficult to properly benchmark libraries like these in a fair way, I've made an attempt in the graph below. These benchmarks are available in the `bench` folder and you can easily run them yourself with `cargo run --release`.
The format and data used in the benchmarks were taken from the `flatbuffers` benchmarks github repo. You should always benchmark/test your own use case for each library before making any choices on what to use.
**Legend**: Ops / Millisecond, higher is better
| Format / Lib | Encode | Decode All | Decode 1 | Update 1 | Size (bytes) | Size (Zlib) |
|------------------------------------------------------------|---------|------------|----------|----------|--------------|-------------|
| **Runtime Libs** | | | | | | |
| *NoProto* | | | | | | |
| [no_proto](https://crates.io/crates/no_proto) | 1393 | 1883 | 55556 | 9524 | 308 | 198 |
| Apache Avro | | | | | | |
| [avro-rs](https://crates.io/crates/avro-rs) | 156 | 57 | 56 | 40 | 702 | 337 |
| FlexBuffers | | | | | | |
| [flexbuffers](https://crates.io/crates/flexbuffers) | 444 | 962 | 24390 | 294 | 490 | 309 |
| JSON | | | | | | |
| [json](https://crates.io/crates/json) | 609 | 481 | 607 | 439 | 439 | 184 |
| [serde_json](https://crates.io/crates/serde_json) | 938 | 646 | 644 | 403 | 446 | 198 |
| BSON | | | | | | |
| [bson](https://crates.io/crates/bson) | 129 | 116 | 123 | 90 | 414 | 216 |
| [rawbson](https://crates.io/crates/rawbson) | 130 | 1117 | 17857 | 89 | 414 | 216 |
| MessagePack | | | | | | |
| [rmp](https://crates.io/crates/rmp) | 661 | 623 | 832 | 202 | 311 | 193 |
| [messagepack-rs](https://crates.io/crates/messagepack-rs) | 152 | 266 | 284 | 138 | 296 | 187 |
| **Compiled Libs** | | | | | | |
| Flatbuffers | | | | | | |
| [flatbuffers](https://crates.io/crates/flatbuffers) | 3165 | 16393 | 250000 | 2532 | 264 | 181 |
| Bincode | | | | | | |
| [bincode](https://crates.io/crates/bincode) | 6757 | 9259 | 10000 | 4115 | 163 | 129 |
| Postcard | | | | | | |
| [postcard](https://crates.io/crates/postcard) | 3067 | 7519 | 7937 | 2469 | 128 | 119 |
| Protocol Buffers | | | | | | |
| [protobuf](https://crates.io/crates/protobuf) | 953 | 1305 | 1312 | 529 | 154 | 141 |
| [prost](https://crates.io/crates/prost) | 1464 | 2020 | 2232 | 1040 | 154 | 142 |
| Abomonation | | | | | | |
| [abomonation](https://crates.io/crates/abomonation) | 2342 | 125000 | 500000 | 2183 | 261 | 160 |
| Rkyv | | | | | | |
| [rkyv](https://crates.io/crates/rkyv) | 1605 | 37037 | 200000 | 1531 | 180 | 154 |
- **Encode**: Transfer a collection of fields of test data into a serialized `Vec`.
- **Decode All**: Deserialize the test object from the `Vec` into all fields.
- **Decode 1**: Deserialize the test object from the `Vec` into one field.
- **Update 1**: Deserialize, update a single field, then serialize back into `Vec`.
**Runtime VS Compiled Libs**: Some formats require data types to be compiled into the application, which increases performance but means data types *cannot change at runtime*. If data types need to mutate during runtime or can't be known before the application is compiled (like with databases), you must use a format that doesn't compile data types into the application, like JSON or NoProto.
Complete benchmark source code is available [here](https://github.com/only-cliches/NoProto/tree/master/bench). Suggestions for improving the quality of these benchmarks is appreciated.
## NoProto Strengths
If your use case fits any of the points below, NoProto might be a good choice for your application.
1. Flexible At Runtime
If you need to work with data types that will change or be created at runtime, you normally have to pick something like JSON since highly optimized formats like Flatbuffers and Bincode depend on compiling the data types into your application (making everything fixed at runtime). When it comes to formats that can change/implement data types at runtime, NoProto is fastest format we're aware of (if you know if one that might be faster, let us know!).
2. Safely Accept Untrusted Data
The worse case failure mode for NoProto buffers is junk data. While other formats can cause denial of service attacks or allow unsafe memory access, there is no such failure case with NoProto. There is no way to construct a NoProto buffer that would cause any detrement in performance to the host application or lead to unsafe memory access. Also, there is no panic causing code in the library, meaning it will never crash your application.
3. Extremely Fast Updates
If you have a workflow in your application that is read -> modify -> write with buffers, NoProto will usually outperform every other format, including Bincode and Flatbuffers. This is because NoProto never actually deserializes, it doesn't need to. This includes complicated mutations like pushing a value onto a nested list or replacing entire structs.
4. All Fields Optional, Insert/Update In Any Order
Many formats require that all values be present to close the buffer, further they may require data to be inserted in a specific order to accomodate the encoding/decoding scheme. With NoProto, all fields are optional and any update/insert can happen in any order.
5. Incremental Deserializing
You only pay for the fields you read, no more. There is no deserializing step in NoProto, opening a buffer performs no operations. Once you start asking for fields, the library will navigate the buffer using the format rules to get just what you asked for and nothing else. If you have a workflow in your application where you read a buffer and only grab a few fields inside it, NoProto will outperform most other libraries.
6. Bytewise Sorting
Almost all of NoProto's data types are designed to serialize into bytewise sortable values, *including signed integers*. When used with Tuples, making database keys with compound sorting is extremly easy. When you combine that with first class support for `UUID`s and `ULID`s NoProto makes an excellent tool for parsing and creating primary keys for databases like RocksDB, LevelDB and TiKV.
7. `no_std` Support
If you need a serialization format with low memory usage that works in `no_std` environments, NoProto is one of the few good choices.
8. Stable
NoProto will never cause a panic in your application. It has *zero* panics or unwraps, meaning there is no code path that could lead to a panic. Fallback behavior is to provide a sane default path or bubble an error up to the caller.
9. CPU Independent
All numbers and pointers in NoProto buffers are always stored in big endian, so you can safely create buffers on any CPU architecture and know that they will work with any other CPU architecture.
### When to use Flatbuffers / Bincode / CapN Proto
If you can safely compile all your data types into your application, all the buffers/data is trusted, and you don't intend to mutate buffers after they're created, Bincode/Flatbuffers/CapNProto is a better choice for you.
### When to use JSON / BSON / MessagePack
If your data changes so often that schemas don't really make sense or the format you use must be self describing, JSON/BSON/MessagePack is a better choice. Although I'd argue that if you *can* make schemas work you should. Once you can use a format with schemas you save a ton of space in the resulting buffers and performance far better.
## Limitations
- Structs and Tuples cannot have more than 255 items.
- Lists and Maps cannot have more than 2^16 (~64k) items.
- You cannot nest more than 255 levels deep.
- Struct field names cannot be longer than 255 UTF8 bytes.
- Enum/Option types are limited to 255 options and each option cannot be more than 255 UTF8 Bytes.
- Map keys cannot be larger than 255 UTF8 bytes.
- Buffers cannot be larger than 2^32 bytes or ~4GB.
## Unsafe
This library makes use of `unsafe` to get better performance. Generally speaking, it's not possible to have a high performance serialization library without `unsafe`. It is only used where performance improvements are significant and additional checks are performed so that the worst case for any `unsafe` block is it leads to junk data in a buffer.
----------------------
MIT License
Copyright (c) 2021 Scott Lott
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: bench/Cargo.toml
================================================
[package]
name = "bench"
version = "0.1.0"
authors = ["scottlott"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
abomonation = "0.7.3"
abomonation_derive = "0.5.0"
avro-rs = "0.12.0"
bincode = "1.3.1"
bson = "1.1.0"
bytes = "1.0.0"
flatbuffers = "0.7.0"
flate2 = "1.0.19"
flexbuffers = "0.2.1"
json = "0.12.4"
messagepack-rs = "0.8.0"
no_proto = { path = "../no_proto_rs" }
postcard = { version = "0.5.2", features = ["use-std"] }
prost = "0.7.0"
protobuf = "2.18.1"
rand = "0.7.3"
rawbson = "0.2.0"
rkyv = "0.3.0"
rmp = "0.8.9"
rmp-serde = "0.15.1"
rmpv = "0.4.6"
serde = "1.0.118"
serde_json = "1.0.61"
[target.x86_64-apple-darwin]
rustflags = ["-Ctarget-cpu=native"]
================================================
FILE: bench/README.md
================================================
# NoProto Benchmarks
The benchmarks in this folder are used to record performance progress and provide entirely subjective comparisons to other similar projects.
All libraries are working with an object that contains the same data and fields. Data types are matched as much as possible.
### Size Benchmark
The example object is encoded once, and it's size in bytes is recorded as well as it's size in bytes with zlib compression.
### Encode Benchmark
The example object is encoded/serialized into the format supported by the various libraries. Specifically, the benchmark measures how long it takes to get an owned `Vec` out of the library.
### Decode All Benchmark
A single object is encoded, then the library decodes that object into it's parts 1,000,000 times. Copying of the original buffer is only perfomed if it's needed by the library to complete decoding. This measures how long it takes to go from a `Vec` to a shared immutable reference to all properties/values in the object.
### Decode One Benchmark
A single object is encoded, then the library decodes a single property of that object 1,000,000 times. Copying of the original buffer is only perfomed if it's needed by the library to complete decoding. This measures how long it takes to go from a `Vec` to a shared immutable reference of a single value in the object.
### Update One Benchmark
A single object is encoded, then the library should decode, update one property on the object then re encode the object 1,000,000 times. The benchmark measures how long it takes to get from a deserialized buffer into another deserialized buffer with a single update performed in the new buffer.
Benchmarks can be ran with `cargo run --release`.
## Benchmark Rules
It's challenging to provide a level playing field for every library and implementation. As much as possible, the following guidelines are followed with building the benchmarks:
1. **Allocation is avoided wherever possible.** With serialization and deserialization the cost of allocation is usually the most expensive part of encoding or decoding a message. If a library provides an API that avoids allocation, that one is used where possible.
2. **Dynamic Array types must be used**. Some libraries can avoid allocation by using a fixed size array in the benchmark, isntead of a dynamic one. Since almost every library/format supports lists that can change in size, this optimization is not allowed even if it's possible. The spirit of the benchmark is to test how quickly a dynamically sized array of items can be encoded/decoded, not a fixed size array (even though a fixed size is used).
# Benchmarks Histry
## Feb 8, 2021
### 0.9.4
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 308b, zlib: 198b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Postcard: size: 128b, zlib: 119b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 311b, zlib: 193b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
Avro: size: 702b, zlib: 337b
Flexbuffers: size: 490b, zlib: 309b
Abomonation: size: 261b, zlib: 160b
Rkyv: size: 180b, zlib: 154b
Raw BSON: size: 414b, zlib: 216b
MessagePack: size: 296b, zlib: 187b
Serde JSON: size: 446b, zlib: 198b
======== ENCODE BENCHMARK ========
NoProto: 1393 ops/ms 1.00
Flatbuffers: 3165 ops/ms 2.27
Bincode: 6757 ops/ms 4.84
Postcard: 3067 ops/ms 2.20
Protobuf: 953 ops/ms 0.68
MessagePack: 661 ops/ms 0.47
JSON: 609 ops/ms 0.44
BSON: 129 ops/ms 0.09
Prost: 1464 ops/ms 1.05
Avro: 156 ops/ms 0.11
Flexbuffers: 444 ops/ms 0.32
Abomonation: 2342 ops/ms 1.68
Rkyv: 1605 ops/ms 1.15
Raw BSON: 130 ops/ms 0.09
MessagePack: 152 ops/ms 0.11
Serde JSON: 938 ops/ms 0.67
======== DECODE BENCHMARK ========
NoProto: 1883 ops/ms 1.00
Flatbuffers: 16393 ops/ms 8.57
Bincode: 9259 ops/ms 4.90
Postcard: 7519 ops/ms 3.99
Protobuf: 1305 ops/ms 0.69
MessagePack: 623 ops/ms 0.33
JSON: 481 ops/ms 0.26
BSON: 116 ops/ms 0.06
Prost: 2020 ops/ms 1.07
Avro: 57 ops/ms 0.03
Flexbuffers: 962 ops/ms 0.51
Abomonation: 125000 ops/ms 61.66
Rkyv: 37037 ops/ms 19.16
Raw BSON: 1117 ops/ms 0.59
MessagePack: 266 ops/ms 0.14
Serde JSON: 646 ops/ms 0.34
====== DECODE ONE BENCHMARK ======
NoProto: 55556 ops/ms 1.00
Flatbuffers: 250000 ops/ms 3.88
Bincode: 10000 ops/ms 0.18
Postcard: 7937 ops/ms 0.14
Protobuf: 1312 ops/ms 0.02
MessagePack: 832 ops/ms 0.02
JSON: 607 ops/ms 0.01
BSON: 123 ops/ms 0.00
Prost: 2232 ops/ms 0.04
Avro: 56 ops/ms 0.00
Flexbuffers: 24390 ops/ms 0.44
Abomonation: 500000 ops/ms 7.54
Rkyv: 200000 ops/ms 3.36
Raw BSON: 17857 ops/ms 0.32
MessagePack: 284 ops/ms 0.01
Serde JSON: 644 ops/ms 0.01
====== UPDATE ONE BENCHMARK ======
NoProto: 9524 ops/ms 1.00
Flatbuffers: 2532 ops/ms 0.27
Bincode: 4115 ops/ms 0.43
Postcard: 2469 ops/ms 0.26
Protobuf: 529 ops/ms 0.06
MessagePack: 202 ops/ms 0.02
JSON: 439 ops/ms 0.05
BSON: 90 ops/ms 0.01
Prost: 1040 ops/ms 0.11
Avro: 40 ops/ms 0.00
Flexbuffers: 294 ops/ms 0.03
Abomonation: 2183 ops/ms 0.23
Rkyv: 1531 ops/ms 0.16
Raw BSON: 89 ops/ms 0.01
MessagePack: 138 ops/ms 0.01
Serde JSON: 403 ops/ms 0.04
```
## Feb 7, 2021
### 0.9.3
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 209b, zlib: 167b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Postcard: size: 128b, zlib: 119b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 311b, zlib: 193b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
Avro: size: 702b, zlib: 339b
Flexbuffers: size: 490b, zlib: 309b
Abomonation: size: 261b, zlib: 163b
Rkyv: size: 180b, zlib: 152b
Raw BSON: size: 414b, zlib: 216b
MessagePack: size: 296b, zlib: 187b
Serde JSON: size: 446b, zlib: 198b
======== ENCODE BENCHMARK ========
NoProto: 1258 ops/ms 1.00
Flatbuffers: 3086 ops/ms 2.45
Bincode: 6849 ops/ms 5.44
Postcard: 2841 ops/ms 2.26
Protobuf: 956 ops/ms 0.76
MessagePack: 661 ops/ms 0.53
JSON: 616 ops/ms 0.49
BSON: 129 ops/ms 0.10
Prost: 1570 ops/ms 1.25
Avro: 155 ops/ms 0.12
Flexbuffers: 455 ops/ms 0.36
Abomonation: 2347 ops/ms 1.86
Rkyv: 1684 ops/ms 1.34
Raw BSON: 129 ops/ms 0.10
MessagePack: 149 ops/ms 0.12
Serde JSON: 929 ops/ms 0.74
======== DECODE BENCHMARK ========
NoProto: 1901 ops/ms 1.00
Flatbuffers: 16393 ops/ms 8.54
Bincode: 9524 ops/ms 4.98
Postcard: 7634 ops/ms 4.00
Protobuf: 1269 ops/ms 0.67
MessagePack: 657 ops/ms 0.35
JSON: 497 ops/ms 0.26
BSON: 116 ops/ms 0.06
Prost: 2096 ops/ms 1.10
Avro: 56 ops/ms 0.03
Flexbuffers: 955 ops/ms 0.50
Abomonation: 125000 ops/ms 61.13
Rkyv: 37037 ops/ms 19.34
Raw BSON: 1134 ops/ms 0.60
MessagePack: 263 ops/ms 0.14
Serde JSON: 640 ops/ms 0.34
====== DECODE ONE BENCHMARK ======
NoProto: 55556 ops/ms 1.00
Flatbuffers: 250000 ops/ms 4.03
Bincode: 10204 ops/ms 0.19
Postcard: 7937 ops/ms 0.15
Protobuf: 1252 ops/ms 0.02
MessagePack: 879 ops/ms 0.02
JSON: 619 ops/ms 0.01
BSON: 124 ops/ms 0.00
Prost: 2151 ops/ms 0.04
Avro: 57 ops/ms 0.00
Flexbuffers: 24390 ops/ms 0.45
Abomonation: 500000 ops/ms 7.56
Rkyv: 200000 ops/ms 3.31
Raw BSON: 17857 ops/ms 0.33
MessagePack: 283 ops/ms 0.01
Serde JSON: 650 ops/ms 0.01
====== UPDATE ONE BENCHMARK ======
NoProto: 12821 ops/ms 1.00
Flatbuffers: 2551 ops/ms 0.20
Bincode: 4310 ops/ms 0.34
Postcard: 2273 ops/ms 0.18
Protobuf: 533 ops/ms 0.04
MessagePack: 213 ops/ms 0.02
JSON: 456 ops/ms 0.04
BSON: 90 ops/ms 0.01
Prost: 1079 ops/ms 0.08
Avro: 41 ops/ms 0.00
Flexbuffers: 297 ops/ms 0.02
Abomonation: 2041 ops/ms 0.16
Rkyv: 1560 ops/ms 0.12
Raw BSON: 90 ops/ms 0.01
MessagePack: 135 ops/ms 0.01
Serde JSON: 405 ops/ms 0.03
```
## Jan 13, 2021
### 0.9.1
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 209b, zlib: 167b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 311b, zlib: 193b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
Avro: size: 702b, zlib: 336b
Flexbuffers: size: 490b, zlib: 309b
Abomonation: size: 261b, zlib: 159b
Rkyv: size: 180b, zlib: 151b
Raw BSON: size: 414b, zlib: 216b
MessagePack: size: 296b, zlib: 187b
Serde JSON: size: 446b, zlib: 198b
======== ENCODE BENCHMARK ========
NoProto: 998 ops/ms 1.00
Flatbuffers: 3205 ops/ms 3.21
Bincode: 6135 ops/ms 6.15
Protobuf: 1011 ops/ms 1.01
MessagePack: 681 ops/ms 0.68
JSON: 622 ops/ms 0.62
BSON: 130 ops/ms 0.13
Prost: 1548 ops/ms 1.55
Avro: 158 ops/ms 0.16
Flexbuffers: 447 ops/ms 0.45
Abomonation: 2710 ops/ms 2.71
Rkyv: 1658 ops/ms 1.66
Raw BSON: 128 ops/ms 0.13
MessagePack: 151 ops/ms 0.15
Serde JSON: 948 ops/ms 0.95
======== DECODE BENCHMARK ========
NoProto: 1645 ops/ms 1.00
Flatbuffers: 16393 ops/ms 9.95
Bincode: 9804 ops/ms 5.93
Protobuf: 1294 ops/ms 0.79
MessagePack: 627 ops/ms 0.38
JSON: 491 ops/ms 0.30
BSON: 115 ops/ms 0.07
Prost: 2075 ops/ms 1.26
Avro: 57 ops/ms 0.03
Flexbuffers: 950 ops/ms 0.58
Abomonation: 125000 ops/ms 71.37
Rkyv: 37037 ops/ms 22.23
Raw BSON: 1130 ops/ms 0.69
MessagePack: 246 ops/ms 0.15
Serde JSON: 650 ops/ms 0.39
====== DECODE ONE BENCHMARK ======
NoProto: 45455 ops/ms 1.00
Flatbuffers: 200000 ops/ms 3.97
Bincode: 10417 ops/ms 0.23
Protobuf: 1266 ops/ms 0.03
MessagePack: 833 ops/ms 0.02
JSON: 606 ops/ms 0.01
BSON: 122 ops/ms 0.00
Prost: 2151 ops/ms 0.05
Avro: 56 ops/ms 0.00
Flexbuffers: 25000 ops/ms 0.54
Abomonation: 500000 ops/ms 9.05
Rkyv: 200000 ops/ms 4.06
Raw BSON: 17544 ops/ms 0.39
MessagePack: 263 ops/ms 0.01
Serde JSON: 648 ops/ms 0.01
====== UPDATE ONE BENCHMARK ======
NoProto: 11905 ops/ms 1.00
Flatbuffers: 2500 ops/ms 0.21
Bincode: 4329 ops/ms 0.36
Protobuf: 539 ops/ms 0.05
MessagePack: 209 ops/ms 0.02
JSON: 441 ops/ms 0.04
BSON: 90 ops/ms 0.01
Prost: 1072 ops/ms 0.09
Avro: 41 ops/ms 0.00
Flexbuffers: 294 ops/ms 0.02
Abomonation: 2288 ops/ms 0.19
Rkyv: 1672 ops/ms 0.14
Raw BSON: 90 ops/ms 0.01
MessagePack: 130 ops/ms 0.01
Serde JSON: 407 ops/ms 0.03
```
## Jan 12, 2021
### 0.9.1
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 209b, zlib: 167b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 296b, zlib: 187b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
Avro: size: 702b, zlib: 337b
Flexbuffers: size: 490b, zlib: 309b
Raw BSON: size: 414b, zlib: 216b
======== ENCODE BENCHMARK ========
NoProto: 1032 ops/ms 1.00
Flatbuffers: 3195 ops/ms 3.09
Bincode: 6135 ops/ms 5.94
Protobuf: 981 ops/ms 0.95
MessagePack: 156 ops/ms 0.15
JSON: 618 ops/ms 0.60
BSON: 131 ops/ms 0.13
Prost: 1567 ops/ms 1.52
Avro: 158 ops/ms 0.15
Flexbuffers: 447 ops/ms 0.43
Raw BSON: 130 ops/ms 0.13
======== DECODE BENCHMARK ========
NoProto: 1608 ops/ms 1.00
Flatbuffers: 16393 ops/ms 10.15
Bincode: 9804 ops/ms 6.07
Protobuf: 1245 ops/ms 0.77
MessagePack: 253 ops/ms 0.16
JSON: 489 ops/ms 0.30
BSON: 117 ops/ms 0.07
Prost: 2105 ops/ms 1.31
Avro: 58 ops/ms 0.04
Flexbuffers: 943 ops/ms 0.59
Raw BSON: 441 ops/ms 0.27
====== DECODE ONE BENCHMARK ======
NoProto: 47619 ops/ms 1.00
Flatbuffers: 250000 ops/ms 4.58
Bincode: 10204 ops/ms 0.22
Protobuf: 1264 ops/ms 0.03
MessagePack: 264 ops/ms 0.01
JSON: 587 ops/ms 0.01
BSON: 125 ops/ms 0.00
Prost: 2304 ops/ms 0.05
Avro: 57 ops/ms 0.00
Flexbuffers: 25000 ops/ms 0.54
Raw BSON: 18519 ops/ms 0.41
====== UPDATE ONE BENCHMARK ======
NoProto: 11628 ops/ms 1.00
Flatbuffers: 2506 ops/ms 0.22
Bincode: 4525 ops/ms 0.39
Protobuf: 546 ops/ms 0.05
MessagePack: 134 ops/ms 0.01
JSON: 433 ops/ms 0.04
BSON: 91 ops/ms 0.01
Prost: 1064 ops/ms 0.09
Avro: 40 ops/ms 0.00
Flexbuffers: 294 ops/ms 0.03
Raw BSON: 90 ops/ms 0.01
```
## Jan 10, 2021
### v0.9.0
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 209b, zlib: 167b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 296b, zlib: 187b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
Avro: size: 702b, zlib: 337b
Flexbuffers: size: 490b, zlib: 309b
======== ENCODE BENCHMARK ========
NoProto: 920 ops/ms 1.00
Flatbuffers: 1062 ops/ms 1.15
Bincode: 5882 ops/ms 6.37
Protobuf: 876 ops/ms 0.95
MessagePack: 136 ops/ms 0.15
JSON: 546 ops/ms 0.59
BSON: 115 ops/ms 0.13
Prost: 1361 ops/ms 1.48
Avro: 140 ops/ms 0.15
Flexbuffers: 399 ops/ms 0.43
======== DECODE BENCHMARK ========
NoProto: 1397 ops/ms 1.00
Flatbuffers: 14925 ops/ms 10.68
Bincode: 8621 ops/ms 6.17
Protobuf: 1140 ops/ms 0.82
MessagePack: 223 ops/ms 0.16
JSON: 436 ops/ms 0.31
BSON: 103 ops/ms 0.07
Prost: 1855 ops/ms 1.33
Avro: 51 ops/ms 0.04
Flexbuffers: 843 ops/ms 0.60
====== DECODE ONE BENCHMARK ======
NoProto: 41667 ops/ms 1.00
Flatbuffers: 250000 ops/ms 5.01
Bincode: 9174 ops/ms 0.23
Protobuf: 1155 ops/ms 0.03
MessagePack: 236 ops/ms 0.01
JSON: 533 ops/ms 0.01
BSON: 109 ops/ms 0.00
Prost: 1942 ops/ms 0.05
Avro: 51 ops/ms 0.00
Flexbuffers: 22727 ops/ms 0.56
====== UPDATE ONE BENCHMARK ======
NoProto: 10526 ops/ms 1.00
Flatbuffers: 1057 ops/ms 0.10
Bincode: 4000 ops/ms 0.38
Protobuf: 474 ops/ms 0.05
MessagePack: 121 ops/ms 0.01
JSON: 400 ops/ms 0.04
BSON: 80 ops/ms 0.01
Prost: 966 ops/ms 0.09
Avro: 37 ops/ms 0.00
Flexbuffers: 265 ops/ms 0.03
```
## Jan 4, 2021
### v0.7.4
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 208b, zlib: 166b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 296b, zlib: 187b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
Avro: size: 702b, zlib: 336b
Flexbuffers: size: 490b, zlib: 309b
======== ENCODE BENCHMARK ========
NoProto: 1057 ops/ms 1.00
Flatbuffers: 1046 ops/ms 0.99
Bincode: 5882 ops/ms 5.55
Protobuf: 859 ops/ms 0.81
MessagePack: 135 ops/ms 0.13
JSON: 550 ops/ms 0.52
BSON: 115 ops/ms 0.11
Prost: 1225 ops/ms 1.16
Avro: 138 ops/ms 0.13
Flexbuffers: 401 ops/ms 0.38
======== DECODE BENCHMARK ========
NoProto: 1437 ops/ms 1.00
Flatbuffers: 14706 ops/ms 10.21
Bincode: 8772 ops/ms 6.08
Protobuf: 1140 ops/ms 0.79
MessagePack: 222 ops/ms 0.15
JSON: 438 ops/ms 0.31
BSON: 103 ops/ms 0.07
Prost: 1866 ops/ms 1.30
Avro: 51 ops/ms 0.04
Flexbuffers: 855 ops/ms 0.60
====== DECODE ONE BENCHMARK ======
NoProto: 47619 ops/ms 1.00
Flatbuffers: 250000 ops/ms 4.55
Bincode: 9524 ops/ms 0.21
Protobuf: 1163 ops/ms 0.03
MessagePack: 237 ops/ms 0.01
JSON: 544 ops/ms 0.01
BSON: 109 ops/ms 0.00
Prost: 1984 ops/ms 0.04
Avro: 52 ops/ms 0.00
Flexbuffers: 23256 ops/ms 0.50
====== UPDATE ONE BENCHMARK ======
NoProto: 12195 ops/ms 1.00
Flatbuffers: 1065 ops/ms 0.09
Bincode: 4016 ops/ms 0.33
Protobuf: 480 ops/ms 0.04
MessagePack: 119 ops/ms 0.01
JSON: 396 ops/ms 0.03
BSON: 80 ops/ms 0.01
Prost: 962 ops/ms 0.08
Avro: 37 ops/ms 0.00
Flexbuffers: 264 ops/ms 0.02
```
## Dec 27, 2020
### v0.7.1
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 208b, zlib: 166b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 296b, zlib: 187b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
======== ENCODE BENCHMARK ========
NoProto: 1170 ops/ms 1.00
Flatbuffers: 1188 ops/ms 1.02
Bincode: 6250 ops/ms 5.33
Protobuf: 986 ops/ms 0.84
MessagePack: 155 ops/ms 0.13
JSON: 607 ops/ms 0.52
BSON: 129 ops/ms 0.11
Prost: 1558 ops/ms 1.33
======== DECODE BENCHMARK ========
NoProto: 1634 ops/ms 1.00
Flatbuffers: 15873 ops/ms 9.59
Bincode: 9804 ops/ms 5.98
Protobuf: 1274 ops/ms 0.78
MessagePack: 262 ops/ms 0.16
JSON: 476 ops/ms 0.29
BSON: 120 ops/ms 0.07
Prost: 2049 ops/ms 1.25
====== DECODE ONE BENCHMARK ======
NoProto: 50000 ops/ms 1.00
Flatbuffers: 250000 ops/ms 4.27
Bincode: 10526 ops/ms 0.21
Protobuf: 1245 ops/ms 0.03
MessagePack: 281 ops/ms 0.01
JSON: 599 ops/ms 0.01
BSON: 130 ops/ms 0.00
Prost: 2193 ops/ms 0.05
====== UPDATE ONE BENCHMARK ======
NoProto: 13333 ops/ms 1.00
Flatbuffers: 1208 ops/ms 0.09
Bincode: 4484 ops/ms 0.34
Protobuf: 531 ops/ms 0.04
MessagePack: 138 ops/ms 0.01
JSON: 444 ops/ms 0.03
BSON: 95 ops/ms 0.01
Prost: 1089 ops/ms 0.08
```
## Dec 25, 2020
### v0.7.1
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 209b, zlib: 167b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
ProtoBuf: size: 154b, zlib: 141b
MessagePack: size: 296b, zlib: 187b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
======== ENCODE BENCHMARK ========
NoProto: 1209 ops/ms 1.00
Flatbuffers: 1189 ops/ms 0.98
Bincode: 6250 ops/ms 5.15
ProtoBuf: 958 ops/ms 0.79
MessagePack: 154 ops/ms 0.13
JSON: 606 ops/ms 0.50
BSON: 127 ops/ms 0.10
======== DECODE BENCHMARK ========
NoProto: 1653 ops/ms 1.00
Flatbuffers: 15625 ops/ms 9.38
Bincode: 9434 ops/ms 5.68
ProtoBuf: 1263 ops/ms 0.76
MessagePack: 242 ops/ms 0.15
JSON: 471 ops/ms 0.29
BSON: 122 ops/ms 0.07
====== DECODE ONE BENCHMARK ======
NoProto: 50000 ops/ms 1.00
Flatbuffers: 250000 ops/ms 4.15
Bincode: 10309 ops/ms 0.21
ProtoBuf: 1285 ops/ms 0.03
MessagePack: 271 ops/ms 0.01
JSON: 605 ops/ms 0.01
BSON: 132 ops/ms 0.00
====== UPDATE ONE BENCHMARK ======
NoProto: 14085 ops/ms 1.00
Flatbuffers: 1200 ops/ms 0.09
Bincode: 4367 ops/ms 0.31
ProtoBuf: 556 ops/ms 0.04
MessagePack: 136 ops/ms 0.01
JSON: 445 ops/ms 0.03
BSON: 96 ops/ms 0.01
```
## Dec 21, 2020
### v0.7.1
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 284b, zlib: 229b
Flatbuffers: size: 336b, zlib: 214b
ProtoBuf: size: 220b, zlib: 163b
MessagePack: size: 431b, zlib: 245b
JSON: size: 673b, zlib: 246b
BSON: size: 600b, zlib: 279b
======== ENCODE BENCHMARK ========
NoProto: 822 ops/ms 1.00
Flatbuffers: 1209 ops/ms 1.47
ProtoBuf: 723 ops/ms 0.88
MessagePack: 99 ops/ms 0.12
JSON: 436 ops/ms 0.53
BSON: 82 ops/ms 0.10
======== DECODE BENCHMARK ========
NoProto: 1105 ops/ms 1.00
Flatbuffers: 14925 ops/ms 13.45
ProtoBuf: 881 ops/ms 0.80
MessagePack: 163 ops/ms 0.15
JSON: 299 ops/ms 0.27
BSON: 78 ops/ms 0.07
====== DECODE ONE BENCHMARK ======
NoProto: 52632 ops/ms 1.00
Flatbuffers: 250000 ops/ms 4.17
ProtoBuf: 902 ops/ms 0.02
MessagePack: 171 ops/ms 0.00
JSON: 374 ops/ms 0.01
BSON: 83 ops/ms 0.00
====== UPDATE ONE BENCHMARK ======
NoProto: 10638 ops/ms 1.00
Flatbuffers: 1176 ops/ms 0.11
ProtoBuf: 384 ops/ms 0.04
MessagePack: 91 ops/ms 0.01
JSON: 287 ops/ms 0.03
BSON: 62 ops/ms 0.01
```
## Dec 20, 2020
### v0.7.0
3.4Ghz i5 2017 21.5" iMac with 32 GB RAM
```
========= SIZE BENCHMARK =========
NoProto: size: 284b, zlib: 229b
ProtoBuf: size: 220b, zlib: 163b
MessagePack: size: 431b, zlib: 245b
JSON: size: 673b, zlib: 246b
BSON: size: 600b, zlib: 279b
======== ENCODE BENCHMARK ========
NoProto: 312 ops/ms 1.00
ProtoBuf: 270 ops/ms 0.87
MessagePack: 38 ops/ms 0.12
JSON: 167 ops/ms 0.54
BSON: 28 ops/ms 0.09
======== DECODE BENCHMARK ========
NoProto: 469 ops/ms 1.00
ProtoBuf: 390 ops/ms 0.83
MessagePack: 70 ops/ms 0.15
JSON: 134 ops/ms 0.28
BSON: 34 ops/ms 0.07
====== DECODE ONE BENCHMARK ======
NoProto: 27027 ops/ms 1.00
ProtoBuf: 400 ops/ms 0.02
MessagePack: 80 ops/ms 0.00
JSON: 167 ops/ms 0.01
BSON: 35 ops/ms 0.00
====== UPDATE ONE BENCHMARK ======
NoProto: 3953 ops/ms 1.00
ProtoBuf: 167 ops/ms 0.04
MessagePack: 35 ops/ms 0.01
JSON: 127 ops/ms 0.03
BSON: 26 ops/ms 0.01
```
## Dec 15, 2020
### v0.6.1
3.4Ghz i5 2017 21.5" iMac with 32 GB RAM
```
========= SIZE BENCHMARK =========
NoProto: size: 284b, zlib: 229b
ProtoBuf: size: 220b, zlib: 163b
MessagePack: size: 431b, zlib: 245b
JSON: size: 673b, zlib: 246b
BSON: size: 600b, zlib: 279b
======== ENCODE BENCHMARK ========
NoProto: 272 ops/ms 1.00
ProtoBuf: 266 ops/ms 0.98
MessagePack: 33 ops/ms 0.12
JSON: 186 ops/ms 0.68
BSON: 28 ops/ms 0.10
======== DECODE BENCHMARK ========
NoProto: 375 ops/ms 1.00
ProtoBuf: 365 ops/ms 0.97
MessagePack: 63 ops/ms 0.17
JSON: 127 ops/ms 0.29
BSON: 28 ops/ms 0.07
====== DECODE ONE BENCHMARK ======
NoProto: 5051 ops/ms 1.00
ProtoBuf: 366 ops/ms 0.07
MessagePack: 68 ops/ms 0.01
JSON: 153 ops/ms 0.03
BSON: 30 ops/ms 0.01
====== UPDATE ONE BENCHMARK ======
NoProto: 4098 ops/ms 1.00
ProtoBuf: 160 ops/ms 0.04
MessagePack: 31 ops/ms 0.01
JSON: 115 ops/ms 0.03
BSON: 22 ops/ms 0.01
```
## Dec 13, 2020
### v0.6.0
3.4Ghz i5 2017 21.5" iMac with 32 GB RAM
```
====== SIZE BENCHMARK ======
NoProto: size: 283b, zlib: 226b 1x
Flatbuffers: size: 336b, zlib: 214b 1.2x
ProtoBuf: size: 220b, zlib: 163b 0.8x
MessagePack: size: 431b, zlib: 245b 1.5x
JSON: size: 673b, zlib: 246b 2.4x
BSON: size: 600b, zlib: 279b 2.1x
====== ENCODE BENCHMARK ======
NoProto: 3.536623s (283 ops/ms)
Flatbuffers: 1.942583s (514 ops/ms)
ProtoBuf: 3.551301s (281 ops/ms)
MessagePack: 28.050727s (35 ops/ms)
JSON: 5.436352s (184 ops/ms)
BSON: 36.564978s (27 ops/ms)
====== DECODE BENCHMARK ======
NoProto: 2.496591s (400 ops/ms)
Flatbuffers: 320.065ms (3,124 ops/ms)
ProtoBuf: 2.888706s (346 ops/ms)
MessagePack: 16.576576s (60.3 ops/ms)
JSON: 8.957872s (111 ops/ms)
BSON: 32.770133s (30.5 ops/ms)
====== DECODE ONE BENCHMARK ======
NoProto: 206.966ms (4,831 ops/ms)
Flatbuffers: 13.127ms (76,178 ops/ms)
ProtoBuf: 2.715129s (368 ops/ms)
MessagePack: 14.300117s (69 ops/ms)
JSON: 7.836841s (127 ops/ms)
BSON: 37.513607s (26 ops/ms)
====== UPDATE ONE BENCHMARK ======
NoProto: 264.399ms (3,782 ops/ms)
Flatbuffers: 3.086538s (324 ops/ms)
ProtoBuf: 10.119442s (99 ops/ms)
MessagePack: 35.322739s (28 ops/ms)
JSON: 9.749246s (102 ops/ms)
BSON: 48.0097s (21 ops/ms)
```
## Dec 1, 2020
### v0.5.1
Macbook Air M1 with 8GB (Rosetta)
```
====== SIZE BENCHMARK ======
NoProto: size: 408b, zlib: 321b
Flatbuffers: size: 336b, zlib: 214b
ProtoBuf: size: 220b, zlib: 163b
====== ENCODE BENCHMARK ======
NoProto: 5.707984s (175 ops/ms)
Flatbuffers: 1.556862s (642 ops/ms)
ProtoBuf: 2.209196s (452 ops/ms)
====== DECODE BENCHMARK ======
NoProto: 9.161315s (109 ops/ms)
Flatbuffers: 105.914ms (9,441 ops/ms)
ProtoBuf: 1.691681s (591 ops/ms)
====== UPDATE BENCHMARK ======
NoProto: 602.446ms (1,659 ops/ms)
Flatbuffers: 1.512228s (661 ops/ms)
ProtoBuf: 3.791677s (263 ops/ms)
```
================================================
FILE: bench/src/bench.fbs
================================================
// Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// trying to represent a typical mix of datatypes:
// 1 array of 3 elements, each element: 1 string, 3 nested objects, 9 scalars
// root element has the array, additional string and an enum
namespace benchfb;
enum Enum : short { Apples, Pears, Bananas }
struct Bar {
time:int;
ratio:float;
size:ushort;
}
table FooBar {
sibling:Bar;
name:string;
rating:double;
postfix:ubyte;
}
table FooBarContainer {
list:[FooBar]; // 3 copies of the above
initialized:bool;
fruit:Enum;
location:string;
}
root_type FooBarContainer;
================================================
FILE: bench/src/bench_fb.rs
================================================
// automatically generated by the FlatBuffers compiler, do not modify
extern crate flatbuffers;
#[allow(unused_imports, dead_code)]
pub mod benchfb {
use std::mem;
use std::cmp::Ordering;
extern crate flatbuffers;
use self::flatbuffers::EndianScalar;
#[allow(non_camel_case_types)]
#[repr(i16)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
pub enum Enum {
Apples = 0,
Pears = 1,
Bananas = 2,
}
pub const ENUM_MIN_ENUM: i16 = 0;
pub const ENUM_MAX_ENUM: i16 = 2;
impl<'a> flatbuffers::Follow<'a> for Enum {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
flatbuffers::read_scalar_at::(buf, loc)
}
}
impl flatbuffers::EndianScalar for Enum {
#[inline]
fn to_little_endian(self) -> Self {
let n = i16::to_le(self as i16);
let p = &n as *const i16 as *const Enum;
unsafe { *p }
}
#[inline]
fn from_little_endian(self) -> Self {
let n = i16::from_le(self as i16);
let p = &n as *const i16 as *const Enum;
unsafe { *p }
}
}
impl flatbuffers::Push for Enum {
type Output = Enum;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::(dst, *self);
}
}
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_ENUM:[Enum; 3] = [
Enum::Apples,
Enum::Pears,
Enum::Bananas
];
#[allow(non_camel_case_types)]
pub const ENUM_NAMES_ENUM:[&'static str; 3] = [
"Apples",
"Pears",
"Bananas"
];
pub fn enum_name_enum(e: Enum) -> &'static str {
let index = e as i16;
ENUM_NAMES_ENUM[index as usize]
}
// struct Bar, aligned to 4
#[repr(C, align(4))]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct Bar {
time_: i32,
ratio_: f32,
size__: u16,
padding0__: u16,
} // pub struct Bar
impl flatbuffers::SafeSliceAccess for Bar {}
impl<'a> flatbuffers::Follow<'a> for Bar {
type Inner = &'a Bar;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
<&'a Bar>::follow(buf, loc)
}
}
impl<'a> flatbuffers::Follow<'a> for &'a Bar {
type Inner = &'a Bar;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
flatbuffers::follow_cast_ref::(buf, loc)
}
}
impl<'b> flatbuffers::Push for Bar {
type Output = Bar;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
let src = unsafe {
::std::slice::from_raw_parts(self as *const Bar as *const u8, Self::size())
};
dst.copy_from_slice(src);
}
}
impl<'b> flatbuffers::Push for &'b Bar {
type Output = Bar;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
let src = unsafe {
::std::slice::from_raw_parts(*self as *const Bar as *const u8, Self::size())
};
dst.copy_from_slice(src);
}
}
impl Bar {
pub fn new<'a>(_time: i32, _ratio: f32, _size_: u16) -> Self {
Bar {
time_: _time.to_little_endian(),
ratio_: _ratio.to_little_endian(),
size__: _size_.to_little_endian(),
padding0__: 0,
}
}
pub fn time<'a>(&'a self) -> i32 {
self.time_.from_little_endian()
}
pub fn ratio<'a>(&'a self) -> f32 {
self.ratio_.from_little_endian()
}
pub fn size_<'a>(&'a self) -> u16 {
self.size__.from_little_endian()
}
}
pub enum FooBarOffset {}
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct FooBar<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for FooBar<'a> {
type Inner = FooBar<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf: buf, loc: loc },
}
}
}
impl<'a> FooBar<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
FooBar {
_tab: table,
}
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args FooBarArgs<'args>) -> flatbuffers::WIPOffset> {
let mut builder = FooBarBuilder::new(_fbb);
builder.add_rating(args.rating);
if let Some(x) = args.name { builder.add_name(x); }
if let Some(x) = args.sibling { builder.add_sibling(x); }
builder.add_postfix(args.postfix);
builder.finish()
}
pub const VT_SIBLING: flatbuffers::VOffsetT = 4;
pub const VT_NAME: flatbuffers::VOffsetT = 6;
pub const VT_RATING: flatbuffers::VOffsetT = 8;
pub const VT_POSTFIX: flatbuffers::VOffsetT = 10;
#[inline]
pub fn sibling(&self) -> Option<&'a Bar> {
self._tab.get::(FooBar::VT_SIBLING, None)
}
#[inline]
pub fn name(&self) -> Option<&'a str> {
self._tab.get::>(FooBar::VT_NAME, None)
}
#[inline]
pub fn rating(&self) -> f64 {
self._tab.get::(FooBar::VT_RATING, Some(0.0)).unwrap()
}
#[inline]
pub fn postfix(&self) -> u8 {
self._tab.get::(FooBar::VT_POSTFIX, Some(0)).unwrap()
}
}
pub struct FooBarArgs<'a> {
pub sibling: Option<&'a Bar>,
pub name: Option>,
pub rating: f64,
pub postfix: u8,
}
impl<'a> Default for FooBarArgs<'a> {
#[inline]
fn default() -> Self {
FooBarArgs {
sibling: None,
name: None,
rating: 0.0,
postfix: 0,
}
}
}
pub struct FooBarBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset,
}
impl<'a: 'b, 'b> FooBarBuilder<'a, 'b> {
#[inline]
pub fn add_sibling(&mut self, sibling: &'b Bar) {
self.fbb_.push_slot_always::<&Bar>(FooBar::VT_SIBLING, sibling);
}
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::>(FooBar::VT_NAME, name);
}
#[inline]
pub fn add_rating(&mut self, rating: f64) {
self.fbb_.push_slot::(FooBar::VT_RATING, rating, 0.0);
}
#[inline]
pub fn add_postfix(&mut self, postfix: u8) {
self.fbb_.push_slot::(FooBar::VT_POSTFIX, postfix, 0);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FooBarBuilder<'a, 'b> {
let start = _fbb.start_table();
FooBarBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
pub enum FooBarContainerOffset {}
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct FooBarContainer<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for FooBarContainer<'a> {
type Inner = FooBarContainer<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf: buf, loc: loc },
}
}
}
impl<'a> FooBarContainer<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
FooBarContainer {
_tab: table,
}
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args FooBarContainerArgs<'args>) -> flatbuffers::WIPOffset> {
let mut builder = FooBarContainerBuilder::new(_fbb);
if let Some(x) = args.location { builder.add_location(x); }
if let Some(x) = args.list { builder.add_list(x); }
builder.add_fruit(args.fruit);
builder.add_initialized(args.initialized);
builder.finish()
}
pub const VT_LIST: flatbuffers::VOffsetT = 4;
pub const VT_INITIALIZED: flatbuffers::VOffsetT = 6;
pub const VT_FRUIT: flatbuffers::VOffsetT = 8;
pub const VT_LOCATION: flatbuffers::VOffsetT = 10;
#[inline]
pub fn list(&self) -> Option>>> {
self._tab.get::>>>>(FooBarContainer::VT_LIST, None)
}
#[inline]
pub fn initialized(&self) -> bool {
self._tab.get::(FooBarContainer::VT_INITIALIZED, Some(false)).unwrap()
}
#[inline]
pub fn fruit(&self) -> Enum {
self._tab.get::(FooBarContainer::VT_FRUIT, Some(Enum::Apples)).unwrap()
}
#[inline]
pub fn location(&self) -> Option<&'a str> {
self._tab.get::>(FooBarContainer::VT_LOCATION, None)
}
}
pub struct FooBarContainerArgs<'a> {
pub list: Option>>>>,
pub initialized: bool,
pub fruit: Enum,
pub location: Option>,
}
impl<'a> Default for FooBarContainerArgs<'a> {
#[inline]
fn default() -> Self {
FooBarContainerArgs {
list: None,
initialized: false,
fruit: Enum::Apples,
location: None,
}
}
}
pub struct FooBarContainerBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset,
}
impl<'a: 'b, 'b> FooBarContainerBuilder<'a, 'b> {
#[inline]
pub fn add_list(&mut self, list: flatbuffers::WIPOffset>>>) {
self.fbb_.push_slot_always::>(FooBarContainer::VT_LIST, list);
}
#[inline]
pub fn add_initialized(&mut self, initialized: bool) {
self.fbb_.push_slot::(FooBarContainer::VT_INITIALIZED, initialized, false);
}
#[inline]
pub fn add_fruit(&mut self, fruit: Enum) {
self.fbb_.push_slot::(FooBarContainer::VT_FRUIT, fruit, Enum::Apples);
}
#[inline]
pub fn add_location(&mut self, location: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::>(FooBarContainer::VT_LOCATION, location);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FooBarContainerBuilder<'a, 'b> {
let start = _fbb.start_table();
FooBarContainerBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
#[inline]
pub fn get_root_as_foo_bar_container<'a>(buf: &'a [u8]) -> FooBarContainer<'a> {
flatbuffers::get_root::>(buf)
}
#[inline]
pub fn get_size_prefixed_root_as_foo_bar_container<'a>(buf: &'a [u8]) -> FooBarContainer<'a> {
flatbuffers::get_size_prefixed_root::>(buf)
}
#[inline]
pub fn finish_foo_bar_container_buffer<'a, 'b>(
fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
root: flatbuffers::WIPOffset>) {
fbb.finish(root, None);
}
#[inline]
pub fn finish_size_prefixed_foo_bar_container_buffer<'a, 'b>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>, root: flatbuffers::WIPOffset>) {
fbb.finish_size_prefixed(root, None);
}
} // pub mod benchfb
================================================
FILE: bench/src/bench_pb.proto
================================================
// Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// trying to represent a typical mix of datatypes:
// 1 array of 3 elements, each element: 1 string, 3 nested objects, 9 scalars
// root element has the array, additional string and an enum
syntax = "proto2";
package benchpb;
enum Enum { Apples = 0; Pears = 1; Bananas = 2; }
message Bar {
required int32 time = 2;
required float ratio = 3;
required uint32 size = 4;
}
message FooBar {
optional Bar sibling = 1;
optional string name = 2;
optional double rating = 3;
optional uint32 postfix = 4;
}
message FooBarContainer {
repeated FooBar list = 1; // 3 copies of the above
optional bool initialized = 2;
optional Enum fruit = 3;
optional string location = 4;
}
================================================
FILE: bench/src/bench_pb.rs
================================================
// This file is generated by rust-protobuf 2.18.1. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![rustfmt::skip]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `bench_pb.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_18_1;
#[derive(PartialEq,Clone,Default)]
pub struct Bar {
// message fields
time: ::std::option::Option,
ratio: ::std::option::Option,
size: ::std::option::Option,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Bar {
fn default() -> &'a Bar {
::default_instance()
}
}
impl Bar {
pub fn new() -> Bar {
::std::default::Default::default()
}
// required int32 time = 2;
pub fn get_time(&self) -> i32 {
self.time.unwrap_or(0)
}
pub fn clear_time(&mut self) {
self.time = ::std::option::Option::None;
}
pub fn has_time(&self) -> bool {
self.time.is_some()
}
// Param is passed by value, moved
pub fn set_time(&mut self, v: i32) {
self.time = ::std::option::Option::Some(v);
}
// required float ratio = 3;
pub fn get_ratio(&self) -> f32 {
self.ratio.unwrap_or(0.)
}
pub fn clear_ratio(&mut self) {
self.ratio = ::std::option::Option::None;
}
pub fn has_ratio(&self) -> bool {
self.ratio.is_some()
}
// Param is passed by value, moved
pub fn set_ratio(&mut self, v: f32) {
self.ratio = ::std::option::Option::Some(v);
}
// required uint32 size = 4;
pub fn get_size(&self) -> u32 {
self.size.unwrap_or(0)
}
pub fn clear_size(&mut self) {
self.size = ::std::option::Option::None;
}
pub fn has_size(&self) -> bool {
self.size.is_some()
}
// Param is passed by value, moved
pub fn set_size(&mut self, v: u32) {
self.size = ::std::option::Option::Some(v);
}
}
impl ::protobuf::Message for Bar {
fn is_initialized(&self) -> bool {
if self.time.is_none() {
return false;
}
if self.ratio.is_none() {
return false;
}
if self.size.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int32()?;
self.time = ::std::option::Option::Some(tmp);
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_float()?;
self.ratio = ::std::option::Option::Some(tmp);
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint32()?;
self.size = ::std::option::Option::Some(tmp);
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(v) = self.time {
my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(v) = self.ratio {
my_size += 5;
}
if let Some(v) = self.size {
my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.time {
os.write_int32(2, v)?;
}
if let Some(v) = self.ratio {
os.write_float(3, v)?;
}
if let Some(v) = self.size {
os.write_uint32(4, v)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Bar {
Bar::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
"time",
|m: &Bar| { &m.time },
|m: &mut Bar| { &mut m.time },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
"ratio",
|m: &Bar| { &m.ratio },
|m: &mut Bar| { &mut m.ratio },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
"size",
|m: &Bar| { &m.size },
|m: &mut Bar| { &mut m.size },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::(
"Bar",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static Bar {
static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT;
instance.get(Bar::new)
}
}
impl ::protobuf::Clear for Bar {
fn clear(&mut self) {
self.time = ::std::option::Option::None;
self.ratio = ::std::option::Option::None;
self.size = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Bar {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Bar {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct FooBar {
// message fields
pub sibling: ::protobuf::SingularPtrField,
name: ::protobuf::SingularField<::std::string::String>,
rating: ::std::option::Option,
postfix: ::std::option::Option,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a FooBar {
fn default() -> &'a FooBar {
::default_instance()
}
}
impl FooBar {
pub fn new() -> FooBar {
::std::default::Default::default()
}
// optional .benchpb.Bar sibling = 1;
pub fn get_sibling(&self) -> &Bar {
self.sibling.as_ref().unwrap_or_else(|| ::default_instance())
}
pub fn clear_sibling(&mut self) {
self.sibling.clear();
}
pub fn has_sibling(&self) -> bool {
self.sibling.is_some()
}
// Param is passed by value, moved
pub fn set_sibling(&mut self, v: Bar) {
self.sibling = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_sibling(&mut self) -> &mut Bar {
if self.sibling.is_none() {
self.sibling.set_default();
}
self.sibling.as_mut().unwrap()
}
// Take field
pub fn take_sibling(&mut self) -> Bar {
self.sibling.take().unwrap_or_else(|| Bar::new())
}
// optional string name = 2;
pub fn get_name(&self) -> &str {
match self.name.as_ref() {
Some(v) => &v,
None => "",
}
}
pub fn clear_name(&mut self) {
self.name.clear();
}
pub fn has_name(&self) -> bool {
self.name.is_some()
}
// Param is passed by value, moved
pub fn set_name(&mut self, v: ::std::string::String) {
self.name = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_name(&mut self) -> &mut ::std::string::String {
if self.name.is_none() {
self.name.set_default();
}
self.name.as_mut().unwrap()
}
// Take field
pub fn take_name(&mut self) -> ::std::string::String {
self.name.take().unwrap_or_else(|| ::std::string::String::new())
}
// optional double rating = 3;
pub fn get_rating(&self) -> f64 {
self.rating.unwrap_or(0.)
}
pub fn clear_rating(&mut self) {
self.rating = ::std::option::Option::None;
}
pub fn has_rating(&self) -> bool {
self.rating.is_some()
}
// Param is passed by value, moved
pub fn set_rating(&mut self, v: f64) {
self.rating = ::std::option::Option::Some(v);
}
// optional uint32 postfix = 4;
pub fn get_postfix(&self) -> u32 {
self.postfix.unwrap_or(0)
}
pub fn clear_postfix(&mut self) {
self.postfix = ::std::option::Option::None;
}
pub fn has_postfix(&self) -> bool {
self.postfix.is_some()
}
// Param is passed by value, moved
pub fn set_postfix(&mut self, v: u32) {
self.postfix = ::std::option::Option::Some(v);
}
}
impl ::protobuf::Message for FooBar {
fn is_initialized(&self) -> bool {
for v in &self.sibling {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sibling)?;
},
2 => {
::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_double()?;
self.rating = ::std::option::Option::Some(tmp);
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint32()?;
self.postfix = ::std::option::Option::Some(tmp);
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.sibling.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.name.as_ref() {
my_size += ::protobuf::rt::string_size(2, &v);
}
if let Some(v) = self.rating {
my_size += 9;
}
if let Some(v) = self.postfix {
my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.sibling.as_ref() {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.name.as_ref() {
os.write_string(2, &v)?;
}
if let Some(v) = self.rating {
os.write_double(3, v)?;
}
if let Some(v) = self.postfix {
os.write_uint32(4, v)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> FooBar {
FooBar::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>(
"sibling",
|m: &FooBar| { &m.sibling },
|m: &mut FooBar| { &mut m.sibling },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"name",
|m: &FooBar| { &m.name },
|m: &mut FooBar| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeDouble>(
"rating",
|m: &FooBar| { &m.rating },
|m: &mut FooBar| { &mut m.rating },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
"postfix",
|m: &FooBar| { &m.postfix },
|m: &mut FooBar| { &mut m.postfix },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::(
"FooBar",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static FooBar {
static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT;
instance.get(FooBar::new)
}
}
impl ::protobuf::Clear for FooBar {
fn clear(&mut self) {
self.sibling.clear();
self.name.clear();
self.rating = ::std::option::Option::None;
self.postfix = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for FooBar {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for FooBar {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct FooBarContainer {
// message fields
pub list: ::protobuf::RepeatedField,
initialized: ::std::option::Option,
fruit: ::std::option::Option,
location: ::protobuf::SingularField<::std::string::String>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a FooBarContainer {
fn default() -> &'a FooBarContainer {
::default_instance()
}
}
impl FooBarContainer {
pub fn new() -> FooBarContainer {
::std::default::Default::default()
}
// repeated .benchpb.FooBar list = 1;
pub fn get_list(&self) -> &[FooBar] {
&self.list
}
pub fn clear_list(&mut self) {
self.list.clear();
}
// Param is passed by value, moved
pub fn set_list(&mut self, v: ::protobuf::RepeatedField) {
self.list = v;
}
// Mutable pointer to the field.
pub fn mut_list(&mut self) -> &mut ::protobuf::RepeatedField {
&mut self.list
}
// Take field
pub fn take_list(&mut self) -> ::protobuf::RepeatedField {
::std::mem::replace(&mut self.list, ::protobuf::RepeatedField::new())
}
// optional bool initialized = 2;
pub fn get_initialized(&self) -> bool {
self.initialized.unwrap_or(false)
}
pub fn clear_initialized(&mut self) {
self.initialized = ::std::option::Option::None;
}
pub fn has_initialized(&self) -> bool {
self.initialized.is_some()
}
// Param is passed by value, moved
pub fn set_initialized(&mut self, v: bool) {
self.initialized = ::std::option::Option::Some(v);
}
// optional .benchpb.Enum fruit = 3;
pub fn get_fruit(&self) -> Enum {
self.fruit.unwrap_or(Enum::Apples)
}
pub fn clear_fruit(&mut self) {
self.fruit = ::std::option::Option::None;
}
pub fn has_fruit(&self) -> bool {
self.fruit.is_some()
}
// Param is passed by value, moved
pub fn set_fruit(&mut self, v: Enum) {
self.fruit = ::std::option::Option::Some(v);
}
// optional string location = 4;
pub fn get_location(&self) -> &str {
match self.location.as_ref() {
Some(v) => &v,
None => "",
}
}
pub fn clear_location(&mut self) {
self.location.clear();
}
pub fn has_location(&self) -> bool {
self.location.is_some()
}
// Param is passed by value, moved
pub fn set_location(&mut self, v: ::std::string::String) {
self.location = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_location(&mut self) -> &mut ::std::string::String {
if self.location.is_none() {
self.location.set_default();
}
self.location.as_mut().unwrap()
}
// Take field
pub fn take_location(&mut self) -> ::std::string::String {
self.location.take().unwrap_or_else(|| ::std::string::String::new())
}
}
impl ::protobuf::Message for FooBarContainer {
fn is_initialized(&self) -> bool {
for v in &self.list {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.list)?;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.initialized = ::std::option::Option::Some(tmp);
},
3 => {
::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.fruit, 3, &mut self.unknown_fields)?
},
4 => {
::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.location)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.list {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if let Some(v) = self.initialized {
my_size += 2;
}
if let Some(v) = self.fruit {
my_size += ::protobuf::rt::enum_size(3, v);
}
if let Some(ref v) = self.location.as_ref() {
my_size += ::protobuf::rt::string_size(4, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
for v in &self.list {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if let Some(v) = self.initialized {
os.write_bool(2, v)?;
}
if let Some(v) = self.fruit {
os.write_enum(3, ::protobuf::ProtobufEnum::value(&v))?;
}
if let Some(ref v) = self.location.as_ref() {
os.write_string(4, &v)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> FooBarContainer {
FooBarContainer::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>(
"list",
|m: &FooBarContainer| { &m.list },
|m: &mut FooBarContainer| { &mut m.list },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"initialized",
|m: &FooBarContainer| { &m.initialized },
|m: &mut FooBarContainer| { &mut m.initialized },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>(
"fruit",
|m: &FooBarContainer| { &m.fruit },
|m: &mut FooBarContainer| { &mut m.fruit },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"location",
|m: &FooBarContainer| { &m.location },
|m: &mut FooBarContainer| { &mut m.location },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::(
"FooBarContainer",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static FooBarContainer {
static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT;
instance.get(FooBarContainer::new)
}
}
impl ::protobuf::Clear for FooBarContainer {
fn clear(&mut self) {
self.list.clear();
self.initialized = ::std::option::Option::None;
self.fruit = ::std::option::Option::None;
self.location.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for FooBarContainer {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for FooBarContainer {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum Enum {
Apples = 0,
Pears = 1,
Bananas = 2,
}
impl ::protobuf::ProtobufEnum for Enum {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option {
match value {
0 => ::std::option::Option::Some(Enum::Apples),
1 => ::std::option::Option::Some(Enum::Pears),
2 => ::std::option::Option::Some(Enum::Bananas),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [Enum] = &[
Enum::Apples,
Enum::Pears,
Enum::Bananas,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new_pb_name::("Enum", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for Enum {
}
impl ::std::default::Default for Enum {
fn default() -> Self {
Enum::Apples
}
}
impl ::protobuf::reflect::ProtobufValue for Enum {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0ebench_pb.proto\x12\x07benchpb\"C\n\x03Bar\x12\x12\n\x04time\x18\
\x02\x20\x02(\x05R\x04time\x12\x14\n\x05ratio\x18\x03\x20\x02(\x02R\x05r\
atio\x12\x12\n\x04size\x18\x04\x20\x02(\rR\x04size\"v\n\x06FooBar\x12&\n\
\x07sibling\x18\x01\x20\x01(\x0b2\x0c.benchpb.BarR\x07sibling\x12\x12\n\
\x04name\x18\x02\x20\x01(\tR\x04name\x12\x16\n\x06rating\x18\x03\x20\x01\
(\x01R\x06rating\x12\x18\n\x07postfix\x18\x04\x20\x01(\rR\x07postfix\"\
\x99\x01\n\x0fFooBarContainer\x12#\n\x04list\x18\x01\x20\x03(\x0b2\x0f.b\
enchpb.FooBarR\x04list\x12\x20\n\x0binitialized\x18\x02\x20\x01(\x08R\
\x0binitialized\x12#\n\x05fruit\x18\x03\x20\x01(\x0e2\r.benchpb.EnumR\
\x05fruit\x12\x1a\n\x08location\x18\x04\x20\x01(\tR\x08location**\n\x04E\
num\x12\n\n\x06Apples\x10\0\x12\t\n\x05Pears\x10\x01\x12\x0b\n\x07Banana\
s\x10\x02J\x8c\x0e\n\x06\x12\x04\x13\0+\x01\n\x8d\x06\n\x01\x0c\x12\x03\
\x13\0\x122\xc7\x04\x20Copyright\x202015\x20Google\x20Inc.\x20All\x20rig\
hts\x20reserved.\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\
\x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20us\
e\x20this\x20file\x20except\x20in\x20compliance\x20with\x20the\x20Licens\
e.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20License\x20at\
\n\n\x20\x20\x20\x20\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\
\x20Unless\x20required\x20by\x20applicable\x20law\x20or\x20agreed\x20to\
\x20in\x20writing,\x20software\n\x20distributed\x20under\x20the\x20Licen\
se\x20is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHO\
UT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20\
express\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20the\x20sp\
ecific\x20language\x20governing\x20permissions\x20and\n\x20limitations\
\x20under\x20the\x20License.\n2\xb8\x01\x20trying\x20to\x20represent\x20\
a\x20typical\x20mix\x20of\x20datatypes:\n\x201\x20array\x20of\x203\x20el\
ements,\x20each\x20element:\x201\x20string,\x203\x20nested\x20objects,\
\x209\x20scalars\n\x20root\x20element\x20has\x20the\x20array,\x20additio\
nal\x20string\x20and\x20an\x20enum\n\n\x08\n\x01\x02\x12\x03\x15\0\x10\n\
\t\n\x02\x05\0\x12\x03\x17\01\n\n\n\x03\x05\0\x01\x12\x03\x17\x05\t\n\
\x0b\n\x04\x05\0\x02\0\x12\x03\x17\x0c\x17\n\x0c\n\x05\x05\0\x02\0\x01\
\x12\x03\x17\x0c\x12\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x17\x15\x16\n\
\x0b\n\x04\x05\0\x02\x01\x12\x03\x17\x18\"\n\x0c\n\x05\x05\0\x02\x01\x01\
\x12\x03\x17\x18\x1d\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x17\x20!\n\
\x0b\n\x04\x05\0\x02\x02\x12\x03\x17#/\n\x0c\n\x05\x05\0\x02\x02\x01\x12\
\x03\x17#*\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x17-.\n\n\n\x02\x04\0\
\x12\x04\x19\0\x1d\x01\n\n\n\x03\x04\0\x01\x12\x03\x19\x08\x0b\n\x0b\n\
\x04\x04\0\x02\0\x12\x03\x1a\x02\x1a\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\
\x1a\x02\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x1a\x0b\x10\n\x0c\n\x05\
\x04\0\x02\0\x01\x12\x03\x1a\x11\x15\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\
\x1a\x18\x19\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x1b\x02\x1b\n\x0c\n\x05\
\x04\0\x02\x01\x04\x12\x03\x1b\x02\n\n\x0c\n\x05\x04\0\x02\x01\x05\x12\
\x03\x1b\x0b\x10\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x1b\x11\x16\n\x0c\
\n\x05\x04\0\x02\x01\x03\x12\x03\x1b\x19\x1a\n\x0b\n\x04\x04\0\x02\x02\
\x12\x03\x1c\x02\x1b\n\x0c\n\x05\x04\0\x02\x02\x04\x12\x03\x1c\x02\n\n\
\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x1c\x0b\x11\n\x0c\n\x05\x04\0\x02\
\x02\x01\x12\x03\x1c\x12\x16\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x1c\
\x19\x1a\n\n\n\x02\x04\x01\x12\x04\x1f\0$\x01\n\n\n\x03\x04\x01\x01\x12\
\x03\x1f\x08\x0e\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x20\x02\x1b\n\x0c\n\
\x05\x04\x01\x02\0\x04\x12\x03\x20\x02\n\n\x0c\n\x05\x04\x01\x02\0\x06\
\x12\x03\x20\x0b\x0e\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x20\x0f\x16\n\
\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x20\x19\x1a\n\x0b\n\x04\x04\x01\x02\
\x01\x12\x03!\x02\x1b\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\x03!\x02\n\n\
\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03!\x0b\x11\n\x0c\n\x05\x04\x01\x02\
\x01\x01\x12\x03!\x12\x16\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03!\x19\
\x1a\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\"\x02\x1d\n\x0c\n\x05\x04\x01\
\x02\x02\x04\x12\x03\"\x02\n\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\"\
\x0b\x11\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\"\x12\x18\n\x0c\n\x05\
\x04\x01\x02\x02\x03\x12\x03\"\x1b\x1c\n\x0b\n\x04\x04\x01\x02\x03\x12\
\x03#\x02\x1e\n\x0c\n\x05\x04\x01\x02\x03\x04\x12\x03#\x02\n\n\x0c\n\x05\
\x04\x01\x02\x03\x05\x12\x03#\x0b\x11\n\x0c\n\x05\x04\x01\x02\x03\x01\
\x12\x03#\x12\x19\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03#\x1c\x1d\n\n\n\
\x02\x04\x02\x12\x04&\0+\x01\n\n\n\x03\x04\x02\x01\x12\x03&\x08\x17\n$\n\
\x04\x04\x02\x02\0\x12\x03'\x02\x1b\"\x17\x203\x20copies\x20of\x20the\
\x20above\n\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03'\x02\n\n\x0c\n\x05\x04\
\x02\x02\0\x06\x12\x03'\x0b\x11\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03'\
\x12\x16\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03'\x19\x1a\n\x0b\n\x04\x04\
\x02\x02\x01\x12\x03(\x02\x20\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03(\
\x02\n\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03(\x0b\x0f\n\x0c\n\x05\x04\
\x02\x02\x01\x01\x12\x03(\x10\x1b\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\
\x03(\x1e\x1f\n\x0b\n\x04\x04\x02\x02\x02\x12\x03)\x02\x1a\n\x0c\n\x05\
\x04\x02\x02\x02\x04\x12\x03)\x02\n\n\x0c\n\x05\x04\x02\x02\x02\x06\x12\
\x03)\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03)\x10\x15\n\x0c\n\
\x05\x04\x02\x02\x02\x03\x12\x03)\x18\x19\n\x0b\n\x04\x04\x02\x02\x03\
\x12\x03*\x02\x1f\n\x0c\n\x05\x04\x02\x02\x03\x04\x12\x03*\x02\n\n\x0c\n\
\x05\x04\x02\x02\x03\x05\x12\x03*\x0b\x11\n\x0c\n\x05\x04\x02\x02\x03\
\x01\x12\x03*\x12\x1a\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\x03*\x1d\x1e\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
================================================
FILE: bench/src/main.rs
================================================
use crate::run_bench_rawbson::RawBSONBench;
use crate::run_bench_rkyv::RkyvBench;
use run_bench_json::JSONBench;
use run_bench_messagepack::MessagePackBench;
use run_bench_messagepack_rs::MessagePackRSBench;
use run_bench_serde_json::SerdeJSONBench;
use crate::run_bench_protocol_buffers::ProtocolBufferBench;
use crate::run_bench_no_proto::NoProtoBench;
use crate::run_bench_flatbuffers::FlatBufferBench;
use crate::run_bench_bson::BSONBench;
use crate::run_bench_bincode::BincodeBench;
use crate::run_bench_postcard::PostcardBench;
use crate::run_bench_avro::AvroBench;
use crate::run_bench_prost::ProstBench;
use crate::run_bench_flexbuffers::FlexBench;
use crate::run_bench_abomonation::AbomBench;
pub const LOOPS: usize = 1_000_000;
mod bench_fb;
mod bench_pb;
extern crate protobuf;
extern crate flatbuffers;
#[macro_use]
extern crate json;
extern crate bson;
extern crate rmp;
extern crate serde;
extern crate bincode;
#[macro_use]
extern crate abomonation;
mod run_bench_no_proto;
mod run_bench_protocol_buffers;
mod run_bench_flatbuffers;
mod run_bench_messagepack;
mod run_bench_messagepack_rs;
mod run_bench_json;
mod run_bench_bson;
mod run_bench_bincode;
mod run_bench_postcard;
mod run_bench_prost;
mod run_bench_avro;
mod run_bench_flexbuffers;
mod run_bench_rawbson;
mod run_bench_rkyv;
mod run_bench_abomonation;
mod run_bench_serde_json;
/*
1,000,000 iterations
0.4.2 - 144s
0.5.0 - 6s
*/
fn main() {
NoProtoBench::setup_bench();
AvroBench::setup_bench();
FlatBufferBench::setup_bench();
let np_lib = " [no_proto](https://crates.io/crates/no_proto) ";
let fb_lib = " [flatbuffers](https://crates.io/crates/flatbuffers) ";
let bn_lib = " [bincode](https://crates.io/crates/bincode) ";
let pc_lib = " [postcard](https://crates.io/crates/postcard) ";
let pb_lib = " [protobuf](https://crates.io/crates/protobuf) ";
let msg_lib = " [rmp](https://crates.io/crates/rmp) ";
let json_lib = " [json](https://crates.io/crates/json) ";
let bson_lib = " [bson](https://crates.io/crates/bson) ";
let pro_lib = " [prost](https://crates.io/crates/prost) ";
let avro_lib = " [avro-rs](https://crates.io/crates/avro-rs) ";
let flx_lib = " [flexbuffers](https://crates.io/crates/flexbuffers) ";
let abo_lib = " [abomonation](https://crates.io/crates/abomonation) ";
let rkyv_lib = " [rkyv](https://crates.io/crates/rkyv) ";
let rbso_lib = " [rawbson](https://crates.io/crates/rawbson) ";
let msg2_lib = " [messagepack-rs](https://crates.io/crates/messagepack-rs)";
let json2_lib = " [serde_json](https://crates.io/crates/serde_json) ";
println!("\n========= SIZE BENCHMARK =========");
let np_size = NoProtoBench::size_bench();
let fb_size = FlatBufferBench::size_bench();
let bn_size = BincodeBench::size_bench();
let pc_size = PostcardBench::size_bench();
let pb_size = ProtocolBufferBench::size_bench();
let msg_size = MessagePackBench::size_bench();
let json_size = JSONBench::size_bench();
let bson_size = BSONBench::size_bench();
let pro_size = ProstBench::size_bench();
let avro_size = AvroBench::size_bench();
let flx_size = FlexBench::size_bench();
let abo_size = AbomBench::size_bench();
let rkyv_size = RkyvBench::size_bench();
let rbso_size = RawBSONBench::size_bench();
let msg2_size = MessagePackRSBench::size_bench();
let json2_size = SerdeJSONBench::size_bench();
println!("\n======== ENCODE BENCHMARK ========");
let (base, np_enc) = NoProtoBench::encode_bench().unwrap();
let fb_enc = FlatBufferBench::encode_bench(base);
let bn_enc = BincodeBench::encode_bench(base);
let pc_enc = PostcardBench::encode_bench(base);
let pb_enc = ProtocolBufferBench::encode_bench(base);
let msg_enc = MessagePackBench::encode_bench(base);
let json_enc = JSONBench::encode_bench(base);
let bson_enc = BSONBench::encode_bench(base);
let pro_enc = ProstBench::encode_bench(base);
let avro_enc = AvroBench::encode_bench(base);
let flx_enc = FlexBench::encode_bench(base);
let abo_enc = AbomBench::encode_bench(base);
let rkyv_enc = RkyvBench::encode_bench(base);
let rbso_enc = RawBSONBench::encode_bench(base);
let msg2_enc = MessagePackRSBench::encode_bench(base);
let json2_enc = SerdeJSONBench::encode_bench(base);
println!("\n======== DECODE BENCHMARK ========");
let (base, np_dec) = NoProtoBench::decode_bench().unwrap();
let fb_dec = FlatBufferBench::decode_bench(base);
let bn_dec = BincodeBench::decode_bench(base);
let pc_dec = PostcardBench::decode_bench(base);
let pb_dec = ProtocolBufferBench::decode_bench(base);
let msg_dec = MessagePackBench::decode_bench(base);
let json_dec = JSONBench::decode_bench(base);
let bson_dec = BSONBench::decode_bench(base);
let pro_dec = ProstBench::decode_bench(base);
let avro_dec = AvroBench::decode_bench(base);
let flx_dec = FlexBench::decode_bench(base);
let abo_dec = AbomBench::decode_bench(base);
let rkyv_dec = RkyvBench::decode_bench(base);
let rbso_dec = RawBSONBench::decode_bench(base);
let msg2_dec = MessagePackRSBench::decode_bench(base);
let json2_dec = SerdeJSONBench::decode_bench(base);
println!("\n====== DECODE ONE BENCHMARK ======");
let (base, np_dec1) = NoProtoBench::decode_one_bench().unwrap();
let fb_dec1 = FlatBufferBench::decode_one_bench(base);
let bn_dec1 = BincodeBench::decode_one_bench(base);
let pc_dec1 = PostcardBench::decode_one_bench(base);
let pb_dec1 = ProtocolBufferBench::decode_one_bench(base);
let msg_dec1 = MessagePackBench::decode_one_bench(base);
let json_dec1 = JSONBench::decode_one_bench(base);
let bson_dec1 = BSONBench::decode_one_bench(base);
let pro_dec1 = ProstBench::decode_one_bench(base);
let avro_dec1 = AvroBench::decode_one_bench(base);
let flx_dec1 = FlexBench::decode_one_bench(base);
let abo_dec1 = AbomBench::decode_one_bench(base);
let rkyv_dec1 = RkyvBench::decode_one_bench(base);
let rbso_dec1 = RawBSONBench::decode_one_bench(base);
let msg2_dec1 = MessagePackRSBench::decode_one_bench(base);
let json2_dec1 = SerdeJSONBench::decode_one_bench(base);
println!("\n====== UPDATE ONE BENCHMARK ======");
let (base, np_up) = NoProtoBench::update_bench().unwrap();
let fb_up = FlatBufferBench::update_bench(base);
let bn_up = BincodeBench::update_bench(base);
let pc_up = PostcardBench::update_bench(base);
let pb_up = ProtocolBufferBench::update_bench(base);
let msg_up = MessagePackBench::update_bench(base);
let json_up = JSONBench::update_bench(base);
let bson_up = BSONBench::update_bench(base);
let pro_up = ProstBench::update_bench(base);
let avro_up = AvroBench::update_bench(base);
let flx_up = FlexBench::update_bench(base);
let abo_up = AbomBench::update_bench(base);
let rkyv_up = RkyvBench::update_bench(base);
let rbso_up = RawBSONBench::update_bench(base);
let msg2_up = MessagePackRSBench::update_bench(base);
let json2_up = SerdeJSONBench::update_bench(base);
println!("\n\n");
println!("//! | Format / Lib | Encode | Decode All | Decode 1 | Update 1 | Size (bytes) | Size (Zlib) |");
println!("//! |------------------------------------------------------------|---------|------------|----------|----------|--------------|-------------|");
println!("//! | **Runtime Libs** | | | | | | |");
println!("//! | *NoProto* | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", np_lib, np_enc, np_dec, np_dec1, np_up, np_size.0, np_size.1);
println!("//! | Apache Avro | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", avro_lib, avro_enc, avro_dec, avro_dec1, avro_up, avro_size.0, avro_size.1);
println!("//! | FlexBuffers | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", flx_lib, flx_enc, flx_dec, flx_dec1, flx_up, flx_size.0, flx_size.1);
println!("//! | JSON | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", json_lib, json_enc, json_dec, json_dec1, json_up, json_size.0, json_size.1);
println!("//! | {} | {} | {} | {} | {} | {} | {} |", json2_lib, json2_enc, json2_dec, json2_dec1, json2_up, json2_size.0, json2_size.1);
println!("//! | BSON | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", bson_lib, bson_enc, bson_dec, bson_dec1, bson_up, bson_size.0, bson_size.1);
println!("//! | {} | {} | {} | {} | {} | {} | {} |", rbso_lib, rbso_enc, rbso_dec, rbso_dec1, rbso_up, rbso_size.0, rbso_size.1);
println!("//! | MessagePack | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", msg_lib, msg_enc, msg_dec, msg_dec1, msg_up, msg_size.0, msg_size.1);
println!("//! | {} | {} | {} | {} | {} | {} | {} |", msg2_lib, msg2_enc, msg2_dec, msg2_dec1, msg2_up, msg2_size.0, msg2_size.1);
println!("//! | **Compiled Libs** | | | | | | |");
println!("//! | Flatbuffers | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", fb_lib, fb_enc, fb_dec, fb_dec1, fb_up, fb_size.0, fb_size.1);
println!("//! | Bincode | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", bn_lib, bn_enc, bn_dec, bn_dec1, bn_up, bn_size.0, bn_size.1);
println!("//! | Postcard | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", pc_lib, pc_enc, pc_dec, pc_dec1, pc_up, pc_size.0, pc_size.1);
println!("//! | Protocol Buffers | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", pb_lib, pb_enc, pb_dec, pb_dec1, pb_up, pb_size.0, pb_size.1);
println!("//! | {} | {} | {} | {} | {} | {} | {} |", pro_lib, pro_enc, pro_dec, pro_dec1, pro_up, pro_size.0, pro_size.1);
println!("//! | Abomonation | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", abo_lib, abo_enc, abo_dec, abo_dec1, abo_up, abo_size.0, abo_size.1);
println!("//! | Rkyv | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", rkyv_lib, rkyv_enc, rkyv_dec, rkyv_dec1, rkyv_up, rkyv_size.0, rkyv_size.1);
}
================================================
FILE: bench/src/run_bench_abomonation.rs
================================================
use crate::LOOPS;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use abomonation::{encode, decode};
use abomonation_derive::*;
#[derive(Abomonation, PartialEq, Eq, Debug, Clone)]
enum Fruit {
Apples, Pears, Bananas
}
#[derive(Abomonation, PartialEq, Debug, Clone)]
struct Bar {
time: i32,
ratio: f32,
size: u16
}
#[derive(Abomonation, PartialEq, Debug, Clone)]
struct FooBar {
sibling: Bar,
name: String,
rating: f64,
postfix: char
}
#[derive(Abomonation, PartialEq, Debug, Clone)]
struct FooBarContainer {
list: Vec,
initialized: bool,
fruit: Fruit,
location: String
}
pub struct AbomBench();
impl AbomBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Abomonation: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 261);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Abomonation: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec {
let mut vector: Vec = Vec::new();
for x in 0..3 {
let bar = Bar {
time: 123456 + (x as i32),
ratio: 3.14159 + (x as f32),
size: 10000 + (x as u16)
};
let foobar = FooBar {
sibling: bar,
name: String::from("Hello, world!"),
rating: 3.1415432432445543543 + (x as f64),
postfix: '!'
};
vector.push(foobar);
}
let foobar_c = FooBarContainer {
location: String::from("http://arstechnica.com"),
fruit: Fruit::Apples,
initialized: true,
list: vector
};
let mut bytes = Vec::new();
unsafe { encode(&foobar_c, &mut bytes).unwrap(); };
bytes
}
pub fn update_bench(base: u128) -> String {
let mut buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
if let Some((result, _remaining)) = unsafe { decode::(&mut buffer) } {
let mut result2 = result.clone();
result2.list[0].name = String::from("bob");
let mut bytes = Vec::new();
unsafe { encode(&result2, &mut bytes).unwrap() };
assert_eq!(bytes.len(), 251);
} else {
panic!()
}
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Abomonation: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let mut buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
if let Some((result, _remaining)) = unsafe { decode::(&mut buffer) } {
assert_eq!(result.location, "http://arstechnica.com");
} else {
panic!()
}
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Abomonation: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let mut buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded: &FooBarContainer = if let Some((result, _remaining)) = unsafe { decode::(&mut buffer) } { result } else { panic!() };
let mut loops = 0;
decoded.list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let old_bar = &foobar.sibling;
assert_eq!(old_bar.time, 123456 + (x as i32));
assert_eq!(old_bar.ratio, 3.14159 + (x as f32));
assert_eq!(old_bar.size, 10000 + (x as u16));
assert_eq!(foobar.name, "Hello, world!");
assert_eq!(foobar.rating, 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.postfix, '!');
});
assert!(loops == 3);
assert_eq!(decoded.location, "http://arstechnica.com");
assert_eq!(decoded.fruit, Fruit::Apples);
assert_eq!(decoded.initialized, true);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Abomonation: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_avro.rs
================================================
use crate::LOOPS;
use avro_rs::{
types::Record, types::Value, Codec, Days, Decimal, Duration, Error, Millis, Months, Reader,
Schema, Writer,
};
use flate2::write::ZlibEncoder;
use flate2::Compression;
use serde::{Deserialize, Serialize};
use std::io::prelude::*;
use std::time::SystemTime;
#[repr(i32)]
enum Fruit {
Apples,
Pears,
Bananas,
}
pub struct AvroBench();
impl AvroBench {
pub fn setup_bench() -> u128 {
let start = SystemTime::now();
let factory = Self::get_schema();
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Avro: setup: {:?}", time.as_micros() as f64 / 1000f64);
time.as_micros()
}
fn get_schema() -> Schema {
let foo_bar_container = r#"
{
"name": "FooBarContainer",
"type": "record",
"fields": [
{"name": "initialized", "type": "boolean"},
{"name": "fruit", "type": "int"},
{"name": "location", "type": "string"},
{"name": "list" ,"type": "array", "items": {
"name": "FooBar",
"type": "record",
"fields": [
{"name": "name", "type": "string"},
{"name": "rating", "type": "float"},
{"name": "postfix", "type": "string"},
{"name": "sibling", "type": "record", "fields": [
{"name": "time", "type": "int"},
{"name": "ratio", "type": "float"},
{"name": "size", "type": "int"}
]
}
]
}}
]
}"#;
Schema::parse_str(foo_bar_container).unwrap()
}
pub fn size_bench() -> (usize, usize) {
let schema = Self::get_schema();
let encoded = Self::encode_single(&schema);
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!(
"Avro: size: {}b, zlib: {}b",
encoded.len(),
compressed.len()
);
return (encoded.len(), compressed.len());
}
pub fn encode_bench(base: u128) -> String {
let schema = Self::get_schema();
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single(&schema);
assert_eq!(buffer.len(), 702);
}
let time = SystemTime::now()
.duration_since(start)
.expect("Time went backwards");
println!(
"Avro: {:>9.0} ops/ms {:.2}",
LOOPS as f64 / time.as_millis() as f64,
(base as f64 / time.as_micros() as f64)
);
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single(schema: &Schema) -> Vec {
let mut foobar_c: Vec<(String, Value)> = Vec::new();
foobar_c.push((String::from("initialized"), Value::Boolean(true)));
foobar_c.push((String::from("fruit"), Value::Int(Fruit::Apples as i32)));
foobar_c.push((
String::from("location"),
Value::String(String::from("http://arstechnica.com")),
));
let mut vector: Vec = Vec::new();
for x in 0..3 {
let mut bar: Vec<(String, Value)> = Vec::new();
bar.push((String::from("time"), Value::Int(123456 + (x as i32))));
bar.push((String::from("ratio"), Value::Float(3.14159 + (x as f32))));
bar.push((String::from("size"), Value::Int(10000 + (x as i32))));
let mut foobar: Vec<(String, Value)> = Vec::new();
foobar.push((
String::from("name"),
Value::String(String::from("Hello, world!")),
));
foobar.push((
String::from("rating"),
Value::Float(3.1415432432445543543 + (x as f32)),
));
foobar.push((String::from("postfix"), Value::String(String::from("!"))));
foobar.push((String::from("sibling"), Value::Record(bar)));
vector.push(Value::Record(foobar));
}
foobar_c.push((String::from("list"), Value::Array(vector)));
let mut writer = Writer::new(&schema, Vec::new());
writer.append(Value::Record(foobar_c)).unwrap();
writer.into_inner().unwrap()
}
pub fn update_bench(base: u128) -> String {
let schema = Self::get_schema();
let buffer = Self::encode_single(&schema);
let start = SystemTime::now();
for _x in 0..LOOPS {
let reader = Reader::new(&buffer[..]).unwrap();
let mut foobar_c: Vec<(String, Value)> = Vec::new();
for val in reader {
if let Value::Record(data) = val.unwrap() {
data.iter().for_each(|(key, data)| {
match key.as_str() {
"list" => {
let mut vector: Vec = Vec::new();
if let Value::Array(list) = data {
list.iter().enumerate().for_each(|(i, foo_bar)| {
if i == 0 {
if let Value::Record(foo_bar) = foo_bar {
let mut new_foobar: Vec<(String, Value)> =
Vec::new();
foo_bar.iter().for_each(|(key, value)| {
match key.as_str() {
"name" => {
new_foobar.push((
String::from("name"),
Value::String(String::from("bob")),
));
}
_ => {
new_foobar
.push((key.clone(), value.clone()));
}
}
});
vector.push(Value::Record(new_foobar));
} else {
panic!()
}
} else {
vector.push(foo_bar.clone());
}
});
} else {
panic!()
}
foobar_c.push((String::from("list"), Value::Array(vector)));
}
_ => {
foobar_c.push((key.clone(), data.clone()));
}
};
});
}
}
let mut writer = Writer::new(&schema, Vec::new());
writer.append(Value::Record(foobar_c)).unwrap();
let finished = writer.into_inner().unwrap();
assert_eq!(finished.len(), 692);
}
let time = SystemTime::now()
.duration_since(start)
.expect("Time went backwards");
println!(
"Avro: {:>9.0} ops/ms {:.2}",
LOOPS as f64 / time.as_millis() as f64,
(base as f64 / time.as_micros() as f64)
);
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let schema = Self::get_schema();
let start = SystemTime::now();
let buffer = Self::encode_single(&schema);
for _x in 0..LOOPS {
let mut found = false;
let reader = Reader::new(&buffer[..]).unwrap();
for val in reader {
if let Value::Record(data) = val.unwrap() {
data.iter().for_each(|(key, data)| {
if key == "location" {
if let Value::String(x) = data {
found = true;
assert_eq!("http://arstechnica.com", x);
}
}
});
}
}
assert!(found == true);
}
let time = SystemTime::now()
.duration_since(start)
.expect("Time went backwards");
println!(
"Avro: {:>9.0} ops/ms {:.2}",
LOOPS as f64 / time.as_millis() as f64,
(base as f64 / time.as_micros() as f64)
);
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let schema = Self::get_schema();
let buffer = Self::encode_single(&schema);
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut loops = 0;
let reader = Reader::new(&buffer[..]).unwrap();
for val in reader {
if let Value::Record(data) = val.unwrap() {
data.iter().for_each(|(key, data)| {
match key.as_str() {
"location" => {
if let Value::String(x) = data {
assert_eq!("http://arstechnica.com", x);
} else {
panic!()
}
}
"initialized" => {
if let Value::Boolean(x) = data {
assert_eq!(true, *x);
} else {
panic!()
}
}
"fruit" => {
if let Value::Int(x) = data {
assert_eq!(Fruit::Apples as i32, *x);
} else {
panic!()
}
}
"list" => {
if let Value::Array(list) = data {
list.iter().for_each(|foo_bar| {
if let Value::Record(foo_bar) = foo_bar {
let mut key_count = 0;
foo_bar.iter().for_each(|(key, value)| {
key_count += 1;
match key.as_str() {
"name" => {
if let Value::String(x) = value {
assert_eq!("Hello, world!", x);
} else {
panic!()
}
}
"rating" => {
if let Value::Float(x) = value {
assert_eq!(
3.1415432432445543543
+ (loops as f32),
*x
);
} else {
panic!()
}
}
"postfix" => {
if let Value::String(x) = value {
assert_eq!("!", x);
} else {
panic!()
}
}
"sibling" => {
if let Value::Record(sibling) = value {
let mut foo_key_count = 0;
sibling.iter().for_each(
|(skey, svalue)| {
foo_key_count += 1;
match skey.as_str() {
"time" => {
assert_eq!(
Value::Int(
123456
+ (loops
as i32)
),
*svalue
);
}
"ratio" => {
assert_eq!(
Value::Float(
3.14159
+ (loops
as f32)
),
*svalue
);
}
"size" => {
assert_eq!(
Value::Int(
10000
+ (loops
as i32)
),
*svalue
);
}
_ => panic!(),
}
},
);
assert_eq!(foo_key_count, 3);
} else {
panic!()
}
}
_ => panic!(),
}
});
assert_eq!(key_count, 4);
} else {
panic!()
}
loops += 1;
});
} else {
panic!()
}
}
_ => panic!(),
};
});
}
}
assert!(loops == 3);
}
let time = SystemTime::now()
.duration_since(start)
.expect("Time went backwards");
println!(
"Avro: {:>9.0} ops/ms {:.2}",
LOOPS as f64 / time.as_millis() as f64,
(base as f64 / time.as_micros() as f64)
);
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_bincode.rs
================================================
use crate::LOOPS;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use serde::{Serialize, Deserialize};
use bincode;
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
enum Fruit {
Apples, Pears, Bananas
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct Bar {
time: i32,
ratio: f32,
size: u16
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBar<'fb> {
sibling: Bar,
name: &'fb str,
rating: f64,
postfix: char
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBarContainer<'con> {
list: Vec>,
initialized: bool,
fruit: Fruit,
location: &'con str
}
pub struct BincodeBench();
impl BincodeBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Bincode: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 163);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Bincode: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec {
let mut vector: Vec = Vec::new();
for x in 0..3 {
let bar = Bar {
time: 123456 + (x as i32),
ratio: 3.14159 + (x as f32),
size: 10000 + (x as u16)
};
let foobar = FooBar {
sibling: bar,
name: "Hello, world!",
rating: 3.1415432432445543543 + (x as f64),
postfix: '!'
};
vector.push(foobar);
}
let foobar_c = FooBarContainer {
location: "http://arstechnica.com",
fruit: Fruit::Apples,
initialized: true,
list: vector
};
bincode::serialize(&foobar_c).unwrap()
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut decoded: FooBarContainer = bincode::deserialize(&buffer[..]).unwrap();
decoded.list[0].name = "bob";
let encoded = bincode::serialize(&decoded).unwrap();
assert_eq!(encoded.len(), 153);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Bincode: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded: FooBarContainer = bincode::deserialize(&buffer[..]).unwrap();
assert_eq!(decoded.location, "http://arstechnica.com");
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Bincode: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded: FooBarContainer = bincode::deserialize(&buffer[..]).unwrap();
let mut loops = 0;
decoded.list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let old_bar = &foobar.sibling;
assert_eq!(old_bar.time, 123456 + (x as i32));
assert_eq!(old_bar.ratio, 3.14159 + (x as f32));
assert_eq!(old_bar.size, 10000 + (x as u16));
assert_eq!(foobar.name, "Hello, world!");
assert_eq!(foobar.rating, 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.postfix, '!');
});
assert!(loops == 3);
assert_eq!(decoded.location, "http://arstechnica.com");
assert_eq!(decoded.fruit, Fruit::Apples);
assert_eq!(decoded.initialized, true);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Bincode: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_bson.rs
================================================
use crate::LOOPS;
use std::{io::prelude::*};
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use bson::*;
pub struct BSONBench();
impl BSONBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("BSON: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 414);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("BSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec {
let mut bson_object = doc!{
"fruit": 2i32,
"initialized": true,
"location": "http://arstechnica.com",
"list": []
};
for x in 0..3 {
let list = bson_object.get_array_mut("list").unwrap();
list.push(bson!({
"name": "Hello, World!",
"rating": 3.1415432432445543543 + (x as f64),
"postfix": "!",
"sibling": {
"time": 123456 + (x as i32),
"ratio": 3.14159f64,
"size": 10000 + (x as i32)
}
}));
}
let mut byte_array : Vec = vec![];
bson_object.to_writer(&mut byte_array).unwrap();
return byte_array
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut container = Document::from_reader(&mut std::io::Cursor::new(buffer.clone())).unwrap();
let list = container.get_array_mut("list").unwrap();
let first_list = list[0].as_document_mut().unwrap();
first_list.insert("name", "bob");
let mut byte_array : Vec = vec![];
container.to_writer(&mut byte_array).unwrap();
assert_eq!(byte_array.len(), 404);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("BSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = Document::from_reader(&mut std::io::Cursor::new(buffer.clone())).unwrap();
assert_eq!(container.get_str("location").unwrap(), "http://arstechnica.com");
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("BSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = Document::from_reader(&mut std::io::Cursor::new(buffer.clone())).unwrap();
assert_eq!(container.get_str("location").unwrap(), "http://arstechnica.com");
assert_eq!(container.get_i32("fruit").unwrap(), 2i32);
assert_eq!(container.get_bool("initialized").unwrap(), true);
let mut loops = 0;
container.get_array("list").unwrap().iter().enumerate().for_each(|(x, bson)| {
loops += 1;
let foobar = bson.as_document().unwrap();
assert_eq!(foobar.get_str("name").unwrap(), "Hello, World!");
assert_eq!(foobar.get_f64("rating").unwrap(), 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.get_str("postfix").unwrap(), "!");
let sibling = foobar.get_document("sibling").unwrap();
assert_eq!(sibling.get_i32("time").unwrap(), 123456 + (x as i32));
assert_eq!(sibling.get_f64("ratio").unwrap(), 3.14159f64);
assert_eq!(sibling.get_i32("size").unwrap(), 10000 + (x as i32));
});
assert!(loops == 3);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("BSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_flatbuffers.rs
================================================
use crate::LOOPS;
use crate::bench_fb::benchfb::get_root_as_foo_bar_container;
use crate::bench_fb::benchfb::FooBarContainerArgs as FooBarContainerArgsFB;
use crate::bench_fb::benchfb::FooBarContainer as FooBarContainerFB;
use crate::bench_fb::benchfb::FooBarArgs as FooBarArgsFB;
use crate::bench_fb::benchfb::FooBar as FooBarFB;
use crate::bench_fb::benchfb::Bar as BarFB;
use crate::bench_fb::benchfb::Enum as EnumFB;
use flatbuffers::FlatBufferBuilder;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
pub struct FlatBufferBench();
impl FlatBufferBench {
pub fn setup_bench() -> u128 {
let start = SystemTime::now();
let factory = FlatBufferBuilder::new();
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flatbuffers: setup: {:?}", time.as_micros() as f64 / 1000f64);
time.as_micros()
}
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single(&mut FlatBufferBuilder::new());
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Flatbuffers: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
let mut fbb = FlatBufferBuilder::new();
for _x in 0..LOOPS {
let buffer = Self::encode_single(&mut fbb);
assert_eq!(buffer.len(), 264);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flatbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single(fbb: &mut FlatBufferBuilder) -> Vec {
fbb.reset();
let mut vector = Vec::new();
for x in 0..3 {
let bar = BarFB::new(123456 + (x as i32), 3.14159 + (x as f32), 10000 + (x as u16));
let name = fbb.create_string("Hello, World!");
let foobar_args = FooBarArgsFB { name: Some(name), sibling: Some(&bar), rating: 3.1415432432445543543 + (x as f64), postfix: "!".as_bytes()[0]};
let foobar = FooBarFB::create(fbb, &foobar_args);
vector.push(foobar);
}
let location = fbb.create_string("http://arstechnica.com");
let foobarvec = fbb.create_vector(&vector[..]);
let foobarcontainer_args = FooBarContainerArgsFB { fruit: EnumFB::Apples, initialized: true, location: Some(location), list: Some(foobarvec) };
let foobarcontainer = FooBarContainerFB::create(fbb, &foobarcontainer_args);
fbb.finish(foobarcontainer, None);
fbb.finished_data().to_vec()
}
pub fn update_bench(base: u128) -> String {
let mut fbb: FlatBufferBuilder = FlatBufferBuilder::new();
let buffer = Self::encode_single(&mut fbb);
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = get_root_as_foo_bar_container(&buffer[..]);
fbb.reset();
let mut vector = Vec::new();
container.list().unwrap().iter().enumerate().for_each(|(idx, foobar)| {
let old_bar = foobar.sibling().unwrap();
let bar = BarFB::new(old_bar.time(), old_bar.ratio(), old_bar.size_());
let name = if idx == 0 { // our update
fbb.create_string("bob")
} else {
fbb.create_string(foobar.name().unwrap())
};
let foobar_args = FooBarArgsFB { name: Some(name), sibling: Some(&bar), rating: foobar.rating(), postfix: foobar.postfix()};
let foobar = FooBarFB::create(&mut fbb, &foobar_args);
vector.push(foobar);
});
let location = fbb.create_string(container.location().unwrap());
let foobarvec = fbb.create_vector(&vector[..]);
let foobarcontainer_args = FooBarContainerArgsFB { fruit: container.fruit(), initialized: container.initialized(), location: Some(location), list: Some(foobarvec) };
let foobarcontainer = FooBarContainerFB::create(&mut fbb, &foobarcontainer_args);
fbb.finish(foobarcontainer, None);
let finished = fbb.finished_data().to_vec();
assert_eq!(finished.len(), 248);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flatbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single(&mut FlatBufferBuilder::new());
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = get_root_as_foo_bar_container(&buffer[..]);
assert_eq!(container.location(), Some("http://arstechnica.com"));
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flatbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single(&mut FlatBufferBuilder::new());
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = get_root_as_foo_bar_container(&buffer[..]);
let mut loops = 0;
container.list().unwrap().iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let old_bar = foobar.sibling().unwrap();
assert_eq!(old_bar.time(), 123456 + (x as i32));
assert_eq!(old_bar.ratio(), 3.14159 + (x as f32));
assert_eq!(old_bar.size_(), 10000 + (x as u16));
assert_eq!(foobar.name(), Some("Hello, World!"));
assert_eq!(foobar.rating(), 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.postfix(), "!".as_bytes()[0]);
});
assert!(loops == 3);
assert_eq!(container.location(), Some("http://arstechnica.com"));
assert_eq!(container.fruit(), EnumFB::Apples);
assert_eq!(container.initialized(), true);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flatbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_flexbuffers.rs
================================================
use crate::LOOPS;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use serde::{Serialize, Deserialize};
use flexbuffers::{self, Reader};
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
enum Fruit {
Apples, Pears, Bananas
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct Bar {
time: i32,
ratio: f32,
size: u16
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBar<'fb> {
sibling: Bar,
name: &'fb str,
rating: f64,
postfix: char
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBarContainer<'con> {
list: Vec>,
initialized: bool,
fruit: Fruit,
location: &'con str
}
pub struct FlexBench();
impl FlexBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Flexbuffers: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 490);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flexbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec {
let mut vector: Vec = Vec::new();
for x in 0..3 {
let bar = Bar {
time: 123456 + (x as i32),
ratio: 3.14159 + (x as f32),
size: 10000 + (x as u16)
};
let foobar = FooBar {
sibling: bar,
name: "Hello, world!",
rating: 3.1415432432445543543 + (x as f64),
postfix: '!'
};
vector.push(foobar);
}
let foobar_c = FooBarContainer {
location: "http://arstechnica.com",
fruit: Fruit::Apples,
initialized: true,
list: vector
};
let mut s = flexbuffers::FlexbufferSerializer::new();
foobar_c.serialize(&mut s).unwrap();
s.view().to_vec()
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let reader = flexbuffers::Reader::get_root(&buffer[..]).unwrap();
let mut decoded: FooBarContainer = FooBarContainer::deserialize(reader).unwrap().clone();
decoded.list[0].name = "bob";
let mut s = flexbuffers::FlexbufferSerializer::new();
decoded.serialize(&mut s).unwrap();
assert_eq!(s.view().to_vec().len(), 482);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flexbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let root = Reader::get_root(&buffer[..]).unwrap();
let decoded = root.as_map();
assert_eq!(decoded.idx("location").as_str(), "http://arstechnica.com");
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flexbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let reader = flexbuffers::Reader::get_root(&buffer[..]).unwrap();
let decoded: FooBarContainer = FooBarContainer::deserialize(reader).unwrap();
let mut loops = 0;
decoded.list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let old_bar = &foobar.sibling;
assert_eq!(old_bar.time, 123456 + (x as i32));
assert_eq!(old_bar.ratio, 3.14159 + (x as f32));
assert_eq!(old_bar.size, 10000 + (x as u16));
assert_eq!(foobar.name, "Hello, world!");
assert_eq!(foobar.rating, 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.postfix, '!');
});
assert!(loops == 3);
assert_eq!(decoded.location, "http://arstechnica.com");
assert_eq!(decoded.fruit, Fruit::Apples);
assert_eq!(decoded.initialized, true);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flexbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_json.rs
================================================
use crate::LOOPS;
use std::{io::prelude::*, str::{from_utf8_unchecked}};
use flate2::Compression;
use flate2::write::ZlibEncoder;
use json::{JsonValue};
use std::time::{SystemTime};
pub struct JSONBench();
impl JSONBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("JSON: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 439);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("JSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec {
let mut json_object = object!{
fruit: 2,
initialized: true,
location: "http://arstechnica.com",
list: []
};
for x in 0..3 {
json_object["list"][x] = object!{
name: "Hello, World!",
rating: 3.1415432432445543543 + (x as f64),
postfix: "!",
sibling: {
time: 123456 + (x as i32),
ratio: 3.14159,
size: 10000 + (x as u16)
}
};
}
json_object.dump().as_bytes().to_vec()
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut container = json::parse(unsafe { from_utf8_unchecked(&buffer) }).unwrap();
container["list"][0]["name"] = JsonValue::String(String::from("bob"));
assert_eq!(container.dump().len(), 429);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("JSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = json::parse(unsafe { from_utf8_unchecked(&buffer) }).unwrap();
assert_eq!(container["location"], JsonValue::String(String::from("http://arstechnica.com")));
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("JSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
let hello_world = JsonValue::String(String::from("Hello, World!"));
let ars_technica = JsonValue::String(String::from("http://arstechnica.com"));
for _x in 0..LOOPS {
let container = json::parse(unsafe { from_utf8_unchecked(&buffer) }).unwrap();
assert_eq!(container["location"], ars_technica);
assert_eq!(container["fruit"].as_f64(), Some(2.0f64));
assert_eq!(container["initialized"], JsonValue::Boolean(true));
let mut loops = 0;
if let JsonValue::Array(list) = &container["list"] {
list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
assert_eq!(foobar["name"], hello_world);
assert_eq!(foobar["rating"].as_f64().unwrap(), 3.1415432432445543543 + (x as f64));
assert_eq!(foobar["postfix"], JsonValue::String(String::from("!")));
let sibling = &foobar["sibling"];
assert_eq!(sibling["time"].as_f64().unwrap(), 123456f64 + (x as f64));
assert_eq!(sibling["ratio"].as_f64().unwrap(), 3.14159);
assert_eq!(sibling["size"].as_f64().unwrap(), 10000f64 + (x as f64));
});
}
assert!(loops == 3);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("JSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_messagepack.rs
================================================
use crate::LOOPS;
use std::io::{BufReader, Cursor};
use std::collections::BTreeMap;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use std::collections::HashMap;
use rmp::{encode, decode};
use rmpv::{ValueRef::*, decode::read_value_ref};
use rmpv::encode::write_value_ref;
pub struct MessagePackBench();
impl MessagePackBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("MessagePack: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> std::string::String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 311);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec {
let mut vector = Vec::new();
for x in 0..3 {
let bar = Map(vec![
(String("time".into()), Integer((123456 + (x as i32)).into())),
(String("ratio".into()), F32((3.14159 + (x as f32)).into())),
(String("size".into()), Integer((10000 + (x as u16)).into()))
]);
let foobar = Map(vec![
(String("name".into()), String("Hello, World!".into())),
(String("sibling".into()), bar),
(String("rating".into()), F64((3.1415432432445543543 + (x as f64)).into())),
(String("postfix".into()), String("!".into()))
]);
vector.push(foobar);
}
let value = Map(vec![
(String("fruit".into()), Integer(2u8.into())),
(String("initialized".into()), Boolean(true)),
(String("location".into()), String("http://arstechnica.com".into())),
(String("list".into()), Array(vector))
]);
let mut bytes: Vec = Vec::new();
write_value_ref(&mut bytes, &value).unwrap();
bytes
}
pub fn update_bench(base: u128) -> std::string::String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut container = read_value_ref(&mut &buffer[..]).unwrap().to_owned();
match &mut container {
rmpv::Value::Map(foobarcontainer) => {
if let rmpv::Value::Array(list) = Self::find_mut(foobarcontainer, "list") {
list.iter_mut().enumerate().for_each(|(x, value)| {
if x == 0 {
if let rmpv::Value::Map(foobar) = value {
let value = Self::find_mut(foobar, "name");
*value = rmpv::Value::String("bob".into());
} else { panic!() }
}
});
} else { panic!() }
},
_ => panic!()
}
let mut bytes: Vec = Vec::new();
rmpv::encode::write_value(&mut bytes, &container).unwrap();
assert_eq!(bytes.len(), 301);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> std::string::String {
let buffer = Self::encode_single();
let start = SystemTime::now();
let location = String("location".into());
let url = String("http://arstechnica.com".into());
for _x in 0..LOOPS {
let container = read_value_ref(&mut &buffer[..]).unwrap();
match &container {
Map(foobarcontainer) => {
let location = foobarcontainer.iter().position(|(key, _value)| { key == &location }).unwrap();
assert_eq!(&foobarcontainer[location].1, &url);
},
_ => panic!()
}
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
pub fn find<'find>(container: &'find Vec<(rmpv::ValueRef, rmpv::ValueRef)>, key: &str) -> &'find rmpv::ValueRef<'find> {
let k = String(key.into());
let idx = container.iter().position(|(key, _value)| { key == &k }).unwrap();
&container[idx].1
}
#[inline(always)]
pub fn find_mut<'find>(container: &'find mut Vec<(rmpv::Value, rmpv::Value)>, key: &str) -> &'find mut rmpv::Value {
let k = rmpv::Value::String(key.into());
let idx = container.iter().position(|(key, _value)| { key == &k }).unwrap();
&mut container[idx].1
}
pub fn decode_bench(base: u128) -> std::string::String {
let buffer = Self::encode_single();
let start = SystemTime::now();
let hello_world = String("Hello, World!".into());
let ars_technica = String("http://arstechnica.com".into());
for _x in 0..LOOPS {
let container = read_value_ref(&mut &buffer[..]).unwrap();
match &container {
Map(foobarcontainer) => {
assert_eq!(Self::find(foobarcontainer, "location"), &ars_technica);
assert_eq!(Self::find(foobarcontainer, "fruit"), &Integer(2u8.into()));
assert_eq!(Self::find(foobarcontainer, "initialized"), &Boolean(true));
let mut loops = 0;
if let Array(list) = Self::find(foobarcontainer, "list") {
list.iter().enumerate().for_each(|(x, value)| {
loops += 1;
if let Map(foobar) = value {
assert_eq!(Self::find(foobar, "name"), &hello_world);
assert_eq!(Self::find(foobar, "rating"), &F64((3.1415432432445543543 + (x as f64)).into()));
assert_eq!(Self::find(foobar, "postfix"), &String("!".into()));
if let Map(bar) = Self::find(foobar, "sibling") {
assert_eq!(Self::find(bar, "time"), &Integer((123456 + (x as i32)).into()));
assert_eq!(Self::find(bar, "ratio"), &F32((3.14159 + (x as f32)).into()));
assert_eq!(Self::find(bar, "size"), &Integer((10000 + (x as u16)).into()));
} else { panic!() }
} else { panic!() }
});
} else {
panic!()
}
assert!(loops == 3);
},
_ => panic!()
}
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_messagepack_rs.rs
================================================
use crate::LOOPS;
use messagepack_rs::{deserializable::Deserializable, serializable::Serializable, value::Value};
use std::io::{BufReader, Cursor};
use std::collections::BTreeMap;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
pub struct MessagePackRSBench();
impl MessagePackRSBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("MessagePack: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 296);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec {
let mut vector = Vec::new();
for x in 0..3 {
let mut bar = BTreeMap::new();
bar.insert(String::from("time"), Value::from(123456 + (x as i32)));
bar.insert(String::from("ratio"), Value::from(3.14159 + (x as f32)));
bar.insert(String::from("size"), Value::from(10000 + (x as u16)));
let mut foobar = BTreeMap::new();
foobar.insert(String::from("name"), Value::from("Hello, World!"));
foobar.insert(String::from("sibling"), Value::from(bar));
foobar.insert(String::from("rating"), Value::from(3.1415432432445543543 + (x as f64)));
foobar.insert(String::from("postfix"), Value::from("!".as_bytes()[0]));
vector.push(Value::from(foobar));
}
let mut foobarcontainer = BTreeMap::new();
foobarcontainer.insert(String::from("fruit"), Value::from(2u8));
foobarcontainer.insert(String::from("initialized"), Value::from(true));
foobarcontainer.insert(String::from("location"), Value::from("http://arstechnica.com"));
foobarcontainer.insert(String::from("list"), Value::from(vector));
Value::from(foobarcontainer).serialize().unwrap()
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut container = Value::deserialize(&mut BufReader::new(Cursor::new(buffer.clone()))).unwrap();
match &mut container {
Value::Map(foobarcontainer) => {
if let Value::Array(list) = foobarcontainer.get_mut("list").unwrap() {
list.iter_mut().enumerate().for_each(|(x, value)| {
if x == 0 {
if let Value::Map(foobar) = value {
foobar.insert(String::from("name"), Value::from("bob"));
} else { panic!() }
}
});
} else { panic!() }
},
_ => panic!()
}
assert_eq!(container.serialize().unwrap().len(), 286);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = Value::deserialize(&mut BufReader::new(Cursor::new(buffer.clone()))).unwrap();
match &container {
Value::Map(foobarcontainer) => {
if let Value::String(location) = foobarcontainer.get("location").unwrap() {
assert_eq!(location, &String::from("http://arstechnica.com"));
} else { panic!() }
},
_ => panic!()
}
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
let hello_world = String::from("Hello, World!");
let ars_technica = String::from("http://arstechnica.com");
for _x in 0..LOOPS {
let container = Value::deserialize(&mut BufReader::new(Cursor::new(buffer.clone()))).unwrap();
match &container {
Value::Map(foobarcontainer) => {
if let Value::String(location) = foobarcontainer.get("location").unwrap() {
assert_eq!(location, &ars_technica);
} else { panic!() }
if let Value::UInt8(fruit) = foobarcontainer.get("fruit").unwrap() {
assert_eq!(fruit, &2u8);
} else { panic!() }
if let Value::Bool(init) = foobarcontainer.get("initialized").unwrap() {
assert_eq!(init, &true);
} else { panic!() }
let mut loops = 0;
if let Value::Array(list) = foobarcontainer.get("list").unwrap() {
list.iter().enumerate().for_each(|(x, value)| {
loops += 1;
if let Value::Map(foobar) = value {
if let Value::String(name) = foobar.get("name").unwrap() {
assert_eq!(name, &hello_world);
} else { panic!() }
if let Value::Float64(rating) = foobar.get("rating").unwrap() {
assert_eq!(rating, &(3.1415432432445543543 + (x as f64)));
} else { panic!() }
if let Value::UInt8(postfix) = foobar.get("postfix").unwrap() {
assert_eq!(postfix, &"!".as_bytes()[0]);
} else { panic!() }
if let Value::Map(bar) = foobar.get("sibling").unwrap() {
if let Value::UInt8(time) = bar.get("time").unwrap() {
assert_eq!(time, &(64 + x as u8));
} else { panic!(); }
if let Value::Float32(ratio) = bar.get("ratio").unwrap() {
assert_eq!(ratio, &(3.14159 + (x as f32)));
} else { panic!() }
if let Value::UInt16(size) = bar.get("size").unwrap() {
assert_eq!(size, &(10000 + (x as u16)));
} else { panic!() }
} else { panic!() }
} else { panic!() }
});
} else { panic!() }
assert!(loops == 3);
},
_ => panic!()
}
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_no_proto.rs
================================================
use crate::LOOPS;
use no_proto::{error::NP_Error};
use no_proto::NP_Factory;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
static SCHEMA: [u8; 135] = [21u8, 4, 4, 108, 105, 115, 116, 0, 83, 23, 21, 4, 4, 110, 97, 109, 101, 0, 6, 2, 0, 0, 0, 0, 0, 6, 114, 97, 116, 105, 110, 103, 0, 2, 12, 0, 7, 112, 111, 115, 116, 102, 105, 120, 0, 6, 2, 0, 0, 1, 0, 0, 7, 115, 105, 98, 108, 105, 110, 103, 0, 30, 21, 3, 4, 116, 105, 109, 101, 0, 2, 10, 0, 5, 114, 97, 116, 105, 111, 0, 2, 12, 0, 4, 115, 105, 122, 101, 0, 2, 9, 0, 11, 105, 110, 105, 116, 105, 97, 108, 105, 122, 101, 100, 0, 2, 15, 0, 8, 108, 111, 99, 97, 116, 105, 111, 110, 0, 6, 2, 0, 0, 0, 0, 0, 5, 102, 114, 117, 105, 116, 0, 2, 8, 0];
pub struct NoProtoBench();
impl NoProtoBench {
pub fn setup_bench() -> u128 {
let start = SystemTime::now();
let factory = Self::get_factory().unwrap();
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("NoProto: setup: {:?}", time.as_micros() as f64 / 1000f64);
time.as_micros()
}
pub fn size_bench() -> (usize, usize) {
let factory = NoProtoBench::get_factory().unwrap();
let encoded = Self::encode_single(&factory).unwrap();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("NoProto: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench() -> Result<(u128, String), NP_Error> {
let factory = NoProtoBench::get_factory()?;
let start = SystemTime::now();
for _x in 0..LOOPS {
let new_buffer = NoProtoBench::encode_single(&factory)?;
assert_eq!(new_buffer.len(), 308);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("NoProto: {:>9.0} ops/ms 1.00", LOOPS as f64 / time.as_millis() as f64);
Ok((time.as_micros(), format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)))
}
pub fn update_bench() -> Result<(u128, String), NP_Error> {
let factory = NoProtoBench::get_factory()?;
let new_buffer = NoProtoBench::encode_single(&factory)?;
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut new_buff = factory.open_buffer(new_buffer.clone());
new_buff.set(&["list", "0", "name"], "bob")?;
// new_buff.compact(None)?;
assert_eq!(new_buff.finish().bytes().len(), 308);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("NoProto: {:>9.0} ops/ms 1.00", LOOPS as f64 / time.as_millis() as f64);
Ok((time.as_micros(), format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)))
}
#[inline(always)]
fn get_factory() -> Result {
// NP_Factory::new_bytes(&SCHEMA)
NP_Factory::new(r#"
struct({fields: {
list: list({of: struct({fields: {
name: string(),
rating: float(),
postfix: string({size: 1}),
sibling: struct({fields: {
time: u32(),
ratio: float(),
size: u16()
}})
}})}),
initialized: bool(),
location: string(),
fruit: u8()
}})
"#)
// NP_Factory::new_json(r#"{
// "type": "table",
// "columns": [
// ["list", {"type": "list", "of": {
// "type": "table",
// "columns": [
// ["name", {"type": "string"}],
// ["rating", {"type": "float"}],
// ["postfix", {"type": "string", "size": 1}],
// ["sibling", {"type": "table", "columns": [
// ["time", {"type": "u32"}],
// ["ratio", {"type": "float"}],
// ["size", {"type": "u16"}]
// ]}]
// ]
// }}],
// ["initialized", {"type": "bool"}],
// ["location", {"type": "string"}],
// ["fruit", {"type": "u8"}]
// ]
// }"#)
}
pub fn decode_one_bench() -> Result<(u128, String), NP_Error> {
let factory = NoProtoBench::get_factory()?;
let new_buffer = NoProtoBench::encode_single(&factory)?;
let start = SystemTime::now();
for _x in 0..LOOPS {
let new_buff = factory.open_buffer_ref(&new_buffer);
assert_eq!(new_buff.get(&["location"])?, Some("http://arstechnica.com"));
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("NoProto: {:>9.0} ops/ms 1.00", LOOPS as f64 / time.as_millis() as f64);
Ok((time.as_micros(), format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)))
}
pub fn decode_bench() -> Result<(u128, String), NP_Error> {
let factory = NoProtoBench::get_factory()?;
let new_buffer = NoProtoBench::encode_single(&factory)?;
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut new_buff = factory.open_buffer_ref(&new_buffer);
assert_eq!(new_buff.get(&["initialized"])?, Some(true));
assert_eq!(new_buff.get(&["location"])?, Some("http://arstechnica.com"));
assert_eq!(new_buff.get(&["fruit"])?, Some(2u8));
let mut loops = 0;
for (x1, x) in [("0", 0), ("1", 1), ("2", 2)].iter() {
loops += 1;
new_buff.cursor_to_root();
new_buff.move_cursor(&["list", x1])?;
assert_eq!(new_buff.get(&["name"])?, Some("Hello, world!"));
assert_eq!(new_buff.get(&["rating"])?, Some(3.1415432432445543543 + (*x as f32)));
assert_eq!(new_buff.get(&["postfix"])?, Some("!"));
new_buff.move_cursor(&["sibling"])?;
assert_eq!(new_buff.get(&["time"])?, Some(123456 + (*x as u32)));
assert_eq!(new_buff.get(&["ratio"])?, Some(3.14159 + (*x as f32)));
assert_eq!(new_buff.get(&["size"])?, Some(10000 + (*x as u16)));
}
assert!(loops == 3);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("NoProto: {:>9.0} ops/ms 1.00", LOOPS as f64 / time.as_millis() as f64);
Ok((time.as_micros(), format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)))
}
#[inline(always)]
pub fn encode_single(factory: &NP_Factory) ->Result, NP_Error> {
let mut new_buffer = factory.new_buffer(None);
new_buffer.set(&["initialized"], true)?;
new_buffer.set(&["location"], "http://arstechnica.com")?;
new_buffer.set(&["fruit"], 2u8)?;
for (x1, x) in [("0", 0), ("1", 1), ("2", 2)].iter() {
new_buffer.cursor_to_root();
new_buffer.move_cursor(&["list", x1])?;
new_buffer.set(&["name"], "Hello, world!")?;
new_buffer.set(&["rating"], 3.1415432432445543543 + (*x as f32))?;
new_buffer.set(&["postfix"], "!")?;
new_buffer.move_cursor(&["sibling"])?;
new_buffer.set(&["time"], 123456 + (*x as u32))?;
new_buffer.set(&["ratio"], 3.14159 + (*x as f32))?;
new_buffer.set(&["size"], 10000 + (*x as u16))?;
}
Ok(new_buffer.finish().bytes())
}
}
================================================
FILE: bench/src/run_bench_postcard.rs
================================================
use crate::LOOPS;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use serde::{Serialize, Deserialize};
use postcard;
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
enum Fruit {
Apples, Pears, Bananas
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct Bar {
time: i32,
ratio: f32,
size: u16
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBar<'fb> {
sibling: Bar,
name: &'fb str,
rating: f64,
postfix: char
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBarContainer<'con> {
list: Vec>,
initialized: bool,
fruit: Fruit,
location: &'con str
}
pub struct PostcardBench();
impl PostcardBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Postcard: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 128);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Postcard: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec {
let mut vector: Vec = Vec::new();
for x in 0..3 {
let bar = Bar {
time: 123456 + (x as i32),
ratio: 3.14159 + (x as f32),
size: 10000 + (x as u16)
};
let foobar = FooBar {
sibling: bar,
name: "Hello, world!",
rating: 3.1415432432445543543 + (x as f64),
postfix: '!'
};
vector.push(foobar);
}
let foobar_c = FooBarContainer {
location: "http://arstechnica.com",
fruit: Fruit::Apples,
initialized: true,
list: vector
};
postcard::to_stdvec(&foobar_c).unwrap()
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut decoded: FooBarContainer = postcard::from_bytes(&buffer[..]).unwrap();
decoded.list[0].name = "bob";
let encoded = postcard::to_stdvec(&decoded).unwrap();
assert_eq!(encoded.len(), 118);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Postcard: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded: FooBarContainer = postcard::from_bytes(&buffer[..]).unwrap();
assert_eq!(decoded.location, "http://arstechnica.com");
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Postcard: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let mut buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded: FooBarContainer = postcard::from_bytes(&buffer[..]).unwrap();
let mut loops = 0;
decoded.list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let old_bar = &foobar.sibling;
assert_eq!(old_bar.time, 123456 + (x as i32));
assert_eq!(old_bar.ratio, 3.14159 + (x as f32));
assert_eq!(old_bar.size, 10000 + (x as u16));
assert_eq!(foobar.name, "Hello, world!");
assert_eq!(foobar.rating, 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.postfix, '!');
});
assert!(loops == 3);
assert_eq!(decoded.location, "http://arstechnica.com");
assert_eq!(decoded.fruit, Fruit::Apples);
assert_eq!(decoded.initialized, true);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Postcard: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_prost.rs
================================================
use crate::LOOPS;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use prost::*;
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Bar {
#[prost(int32, required, tag="2")]
pub time: i32,
#[prost(float, required, tag="3")]
pub ratio: f32,
#[prost(uint32, required, tag="4")]
pub size: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FooBar {
#[prost(message, optional, tag="1")]
pub sibling: ::core::option::Option,
#[prost(string, optional, tag="2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(double, optional, tag="3")]
pub rating: ::core::option::Option,
#[prost(uint32, optional, tag="4")]
pub postfix: ::core::option::Option,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FooBarContainer {
/// 3 copies of the above
#[prost(message, repeated, tag="1")]
pub list: ::prost::alloc::vec::Vec,
#[prost(bool, optional, tag="2")]
pub initialized: ::core::option::Option,
#[prost(enumeration="Enum", optional, tag="3")]
pub fruit: ::core::option::Option,
#[prost(string, optional, tag="4")]
pub location: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Enum {
Apples = 0,
Pears = 1,
Bananas = 2,
}
pub struct ProstBench();
impl ProstBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Prost: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 154);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Prost: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec {
let mut vector: Vec = Vec::new();
for x in 0..3 {
let bar = Bar {
time: 123456 + (x as i32),
ratio: 3.14159 + (x as f32),
size: 10000 + (x as u32)
};
let foobar = FooBar {
sibling: Some(bar),
name: Some(String::from("Hello, world!")),
rating: Some(3.1415432432445543543 + (x as f64)),
postfix: Some("!".as_bytes()[0] as u32)
};
vector.push(foobar);
}
let foobar_c = FooBarContainer {
location: Some(String::from("http://arstechnica.com")),
fruit: Some(Enum::Apples as i32),
initialized: Some(true),
list: vector
};
let mut bytes = Vec::new();
foobar_c.encode(&mut bytes).unwrap();
bytes
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut decoded: FooBarContainer = FooBarContainer::decode(&buffer[..]).unwrap();
decoded.list[0].name = Some(String::from("bob"));
let mut bytes = Vec::new();
decoded.encode(&mut bytes).unwrap();
assert_eq!(bytes.len(), 144);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Prost: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let start = SystemTime::now();
let buffer = Self::encode_single();
let value = Some(String::from("http://arstechnica.com"));
for _x in 0..LOOPS {
let decoded: FooBarContainer = FooBarContainer::decode(&buffer[..]).unwrap();
assert_eq!(decoded.location, value);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Prost: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
let hello_world = Some(String::from("Hello, world!"));
let ars_technica = Some(String::from("http://arstechnica.com"));
for _x in 0..LOOPS {
let decoded: FooBarContainer = FooBarContainer::decode(&buffer[..]).unwrap();
let mut loops = 0;
decoded.list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
match foobar.sibling.as_ref() {
Some(old_bar) => {
assert_eq!(old_bar.time, 123456 + (x as i32));
assert_eq!(old_bar.ratio, 3.14159 + (x as f32));
assert_eq!(old_bar.size, 10000 + (x as u32));
},
None => panic!()
}
assert_eq!(foobar.name, hello_world);
assert_eq!(foobar.rating, Some(3.1415432432445543543 + (x as f64)));
assert_eq!(foobar.postfix, Some("!".as_bytes()[0] as u32));
});
assert!(loops == 3);
assert_eq!(decoded.location, ars_technica);
assert_eq!(decoded.fruit, Some(Enum::Apples as i32));
assert_eq!(decoded.initialized, Some(true));
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Prost: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_protocol_buffers.rs
================================================
use crate::LOOPS;
use crate::bench_pb::FooBarContainer;
use crate::bench_pb::FooBar;
use crate::bench_pb::Bar;
use crate::bench_pb::Enum;
use crate::protobuf::Message;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
pub struct ProtocolBufferBench();
impl ProtocolBufferBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Protobuf: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len());
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 154);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Protobuf: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec {
let mut foobarcontainer = FooBarContainer::new();
let mut foobarlist: protobuf::RepeatedField = protobuf::RepeatedField::new();
for y in 0..3 {
let mut foobar = FooBar::new();
foobar.set_name(String::from("Hello, World!"));
foobar.set_rating(3.1415432432445543543 + y as f64);
foobar.set_postfix("!".as_bytes()[0] as u32);
let mut bar = Bar::new();
bar.set_time(123456 + y as i32);
bar.set_ratio(3.14159f32 + y as f32);
bar.set_size(10000 + y as u32);
foobar.set_sibling(bar);
foobarlist.push(foobar);
}
foobarcontainer.set_location(String::from("http://arstechnica.com"));
foobarcontainer.set_initialized(true);
foobarcontainer.set_fruit(Enum::Apples);
foobarcontainer.set_list(foobarlist);
let mut bytes: Vec = Vec::new();
let mut message = protobuf::CodedOutputStream::vec(&mut bytes);
foobarcontainer.compute_size();
foobarcontainer.write_to_with_cached_sizes(&mut message).unwrap();
message.flush().unwrap();
bytes
}
pub fn update_bench(base: u128) -> String {
let start = SystemTime::now();
let buffer = Self::encode_single();
for _x in 0..LOOPS {
let old_foo_bar: FooBarContainer = protobuf::parse_from_bytes(&buffer).unwrap();
let mut foobarcontainer = FooBarContainer::new();
let mut foobarlist: protobuf::RepeatedField = protobuf::RepeatedField::new();
old_foo_bar.get_list().iter().enumerate().for_each(|(idx, old_foo_b)| {
let mut foobar = FooBar::new();
if idx == 0 { // our update
foobar.set_name(String::from("bob"));
} else {
foobar.set_name(old_foo_b.get_name().to_string());
}
foobar.set_rating(old_foo_b.get_rating());
foobar.set_postfix(old_foo_b.get_postfix());
let old_bar = old_foo_b.get_sibling();
let mut bar = Bar::new();
bar.set_time(old_bar.get_time());
bar.set_ratio(old_bar.get_ratio());
bar.set_size(old_bar.get_size());
foobar.set_sibling(bar);
foobarlist.push(foobar);
});
foobarcontainer.set_location(old_foo_bar.get_location().to_string());
foobarcontainer.set_initialized(old_foo_bar.get_initialized());
foobarcontainer.set_fruit(old_foo_bar.get_fruit());
foobarcontainer.set_list(foobarlist);
let mut bytes: Vec = Vec::new();
let mut message = protobuf::CodedOutputStream::vec(&mut bytes);
foobarcontainer.compute_size();
foobarcontainer.write_to_with_cached_sizes(&mut message).unwrap();
message.flush().unwrap();
assert_eq!(bytes.len(), 144);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Protobuf: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let start = SystemTime::now();
let buffer = Self::encode_single();
for _x in 0..LOOPS {
let old_foo_bar: FooBarContainer = protobuf::parse_from_bytes(&buffer).unwrap();
assert_eq!(old_foo_bar.get_location(), "http://arstechnica.com");
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Protobuf: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let start = SystemTime::now();
let buffer = Self::encode_single();
for _x in 0..LOOPS {
let old_foo_bar: FooBarContainer = protobuf::parse_from_bytes(&buffer).unwrap();
let mut loops = 0;
old_foo_bar.get_list().iter().enumerate().for_each(|(y, old_foo_b)| {
loops += 1;
assert_eq!(old_foo_b.get_name(), "Hello, World!");
assert_eq!(old_foo_b.get_rating(), 3.1415432432445543543 + y as f64);
assert_eq!(old_foo_b.get_postfix(), "!".as_bytes()[0] as u32);
let old_bar = old_foo_b.get_sibling();
assert_eq!(old_bar.get_time(), 123456 + y as i32);
assert_eq!(old_bar.get_ratio(), 3.14159f32 + y as f32);
assert_eq!(old_bar.get_size(), 10000 + y as u32);
});
assert!(loops == 3);
assert_eq!(old_foo_bar.get_location(), "http://arstechnica.com");
assert_eq!(old_foo_bar.get_initialized(), true);
assert_eq!(old_foo_bar.get_fruit(), Enum::Apples);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Protobuf: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_rawbson.rs
================================================
use crate::LOOPS;
use std::{io::prelude::*};
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use rawbson::{
Doc,
elem,
};
use bson::*;
pub struct RawBSONBench();
impl RawBSONBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Raw BSON: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 414);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Raw BSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec {
let mut bson_object = doc!{
"fruit": 2i32,
"initialized": true,
"location": "http://arstechnica.com",
"list": []
};
for x in 0..3 {
let list = bson_object.get_array_mut("list").unwrap();
list.push(bson!({
"name": "Hello, World!",
"rating": 3.1415432432445543543 + (x as f64),
"postfix": "!",
"sibling": {
"time": 123456 + (x as i32),
"ratio": 3.14159f64,
"size": 10000 + (x as i32)
}
}));
}
let mut byte_array : Vec = vec![];
bson_object.to_writer(&mut byte_array).unwrap();
return byte_array
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut container = Document::from_reader(&mut std::io::Cursor::new(buffer.clone())).unwrap();
let list = container.get_array_mut("list").unwrap();
let first_list = list[0].as_document_mut().unwrap();
first_list.insert("name", "bob");
let mut byte_array : Vec = vec![];
container.to_writer(&mut byte_array).unwrap();
assert_eq!(byte_array.len(), 404);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Raw BSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = Doc::new(&buffer[..]).unwrap();
assert_eq!(container.get_str("location").unwrap().unwrap(), "http://arstechnica.com");
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Raw BSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = Doc::new(&buffer[..]).unwrap();
assert_eq!(container.get_str("location").unwrap().unwrap(), "http://arstechnica.com");
assert_eq!(container.get_i32("fruit").unwrap().unwrap(), 2i32);
assert_eq!(container.get_bool("initialized").unwrap().unwrap(), true);
let mut loops = 0;
container.get_array("list").unwrap().unwrap().into_iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let foobar = foobar.unwrap().as_document().unwrap();
assert_eq!(foobar.get_str("name").unwrap().unwrap(), "Hello, World!");
assert_eq!(foobar.get_f64("rating").unwrap().unwrap(), 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.get_str("postfix").unwrap().unwrap(), "!");
let sibling = foobar.get_document("sibling").unwrap().unwrap();
assert_eq!(sibling.get_i32("time").unwrap().unwrap(), 123456 + (x as i32));
assert_eq!(sibling.get_f64("ratio").unwrap().unwrap(), 3.14159f64);
assert_eq!(sibling.get_i32("size").unwrap().unwrap(), 10000 + (x as i32));
});
for x in 0..3 {
}
assert!(loops == 3);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Raw BSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_rkyv.rs
================================================
use crate::{LOOPS};
use std::io::{Write, prelude::*};
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use rkyv::{Aligned, Archive, ArchiveBuffer, ArchiveWriter, Archived, Unarchive, Write as RkWrite, archived_ref, archived_value, archived_value_mut};
#[derive(Archive, PartialEq, Debug, Clone, Unarchive)]
struct Bar {
time: i32,
ratio: f32,
size: u16
}
#[derive(Archive, PartialEq, Debug, Clone, Unarchive)]
struct FooBar {
sibling: Bar,
name: String,
rating: f64,
postfix: char
}
#[derive(Archive, PartialEq, Debug, Clone, Unarchive)]
struct FooBarContainer {
list: Vec,
initialized: bool,
fruit: u8,
location: String
}
pub struct RkyvBench();
impl RkyvBench {
pub fn size_bench() -> (usize, usize) {
let (encoded, pos) = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Rkyv: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let (buffer, pos) = Self::encode_single();
assert_eq!(buffer.len(), 180);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Rkyv: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> (Vec, usize) {
let mut vector: Vec = Vec::new();
for x in 0..3 {
let bar = Bar {
time: 123456 + (x as i32),
ratio: 3.14159 + (x as f32),
size: 10000 + (x as u16)
};
let foobar = FooBar {
sibling: bar,
name: String::from("Hello, world!"),
rating: 3.1415432432445543543 + (x as f64),
postfix: '!'
};
vector.push(foobar);
}
let foobar_c = FooBarContainer {
location: String::from("http://arstechnica.com"),
fruit: 2,
initialized: true,
list: vector
};
let mut writer = ArchiveWriter::new(Vec::new());
let pos = writer.archive(&foobar_c).expect("failed to archive test");
(writer.into_inner(), pos)
}
pub fn update_bench(base: u128) -> String {
let (buffer, pos) = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut decoded: FooBarContainer = unsafe { archived_value::(&buffer[..], pos) }.unarchive();
decoded.list[0].name = String::from("bob");
let mut writer = ArchiveWriter::new(Vec::new());
let pos = writer.archive(&decoded).expect("failed to archive test");
assert_eq!(writer.into_inner().len(), 172);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Rkyv: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let (buffer, pos) = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded = unsafe { archived_value::(&buffer[..], pos) };
assert_eq!(decoded.location, "http://arstechnica.com");
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Rkyv: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let (buffer, pos) = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded = unsafe { archived_value::(&buffer[..], pos) };
let mut loops = 0;
decoded.list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let old_bar = &foobar.sibling;
assert_eq!(old_bar.time, 123456 + (x as i32));
assert_eq!(old_bar.ratio, 3.14159 + (x as f32));
assert_eq!(old_bar.size, 10000 + (x as u16));
assert_eq!(foobar.name, "Hello, world!");
assert_eq!(foobar.rating, 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.postfix, '!');
});
assert!(loops == 3);
assert_eq!(decoded.location.as_str(), "http://arstechnica.com");
assert_eq!(decoded.fruit, 2);
assert_eq!(decoded.initialized, true);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Rkyv: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_serde_json.rs
================================================
use crate::LOOPS;
use serde_json::Result;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use serde::{Serialize, Deserialize};
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
enum Fruit {
Apples, Pears, Bananas
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct Bar {
time: i32,
ratio: f32,
size: u16
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBar {
sibling: Bar,
name: String,
rating: f64,
postfix: char
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBarContainer {
list: Vec,
initialized: bool,
fruit: Fruit,
location: String
}
pub struct SerdeJSONBench();
impl SerdeJSONBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Serde JSON: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 446);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Serde JSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec {
let mut vector: Vec = Vec::new();
for x in 0..3 {
let bar = Bar {
time: 123456 + (x as i32),
ratio: 3.14159 + (x as f32),
size: 10000 + (x as u16)
};
let foobar = FooBar {
sibling: bar,
name: String::from("Hello, world!"),
rating: 3.1415432432445543543 + (x as f64),
postfix: '!'
};
vector.push(foobar);
}
let foobar_c = FooBarContainer {
location: String::from("http://arstechnica.com"),
fruit: Fruit::Apples,
initialized: true,
list: vector
};
serde_json::to_string(&foobar_c).unwrap().as_bytes().to_vec()
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut decoded: FooBarContainer = serde_json::from_reader(&buffer[..]).unwrap();
decoded.list[0].name = String::from("bob");
let encoded = serde_json::to_string(&decoded).unwrap().as_bytes().to_vec();
assert_eq!(encoded.len(), 436);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Serde JSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded: FooBarContainer = serde_json::from_reader(&buffer[..]).unwrap();
assert_eq!(decoded.location, "http://arstechnica.com");
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Serde JSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded: FooBarContainer = serde_json::from_reader(&buffer[..]).unwrap();
let mut loops = 0;
decoded.list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let old_bar = &foobar.sibling;
assert_eq!(old_bar.time, 123456 + (x as i32));
assert_eq!(old_bar.ratio, 3.14159 + (x as f32));
assert_eq!(old_bar.size, 10000 + (x as u16));
assert_eq!(foobar.name, "Hello, world!");
assert_eq!(foobar.rating, 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.postfix, '!');
});
assert!(loops == 3);
assert_eq!(decoded.location, "http://arstechnica.com");
assert_eq!(decoded.fruit, Fruit::Apples);
assert_eq!(decoded.initialized, true);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Serde JSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: examples/quick.rs
================================================
use no_proto::{error::NP_Error, NP_Factory};
fn main() -> Result<(), NP_Error> {
// JSON is used to describe schema for the factory
// Each factory represents a single schema
// One factory can be used to serialize/deserialize any number of buffers
let user_factory = NP_Factory::new(r#"{
"type": "table",
"columns": [
["name", {"type": "string"}],
["age", {"type": "u16", "default": 0}],
["tags", {"type": "list", "of": {
"type": "string"
}}]
]
}"#)?;
println!("\n= Quick Example =\n");
// create a new empty buffer
let user_buffer = user_factory
// optional capacity, optional address size (u16 by default)
.empty_buffer(None);
// close buffer and get internal bytes
let user_bytes: Vec = user_buffer.close();
// show bytes (empty)
println!("bytes: {:?}", user_bytes);
// open the buffer again
let mut user_buffer = user_factory.open_buffer(user_bytes);
// set an internal value of the buffer, set the "name" column
user_buffer.set(&["name"], "Billy Joel")?;
// get an internal value of the buffer from the "name" column
let name = user_buffer.get::<&str>(&["name"])?;
assert_eq!(name, Some("Billy Joel"));
println!("\nname: {}", name.unwrap());
// show bytes
let user_bytes: Vec = user_buffer.close();
println!("bytes: {:?}", user_bytes);
let mut user_buffer = user_factory.open_buffer(user_bytes);
user_buffer.compact(None)?;
// assign nested internal values, sets the first tag element
user_buffer.set(&["tags", "0"], "first tag")?;
// get nested internal value, first tag from the tag list
let tag = user_buffer.get::<&str>(&["tags", "0"])?;
assert_eq!(tag, Some("first tag"));
println!("\ntag: {}", tag.unwrap());
// show bytes
let user_bytes: Vec = user_buffer.close();
println!("bytes: {:?}", user_bytes);
let user_buffer = user_factory.open_buffer(user_bytes);
// get nested internal value, the age field
let age = user_buffer.get::(&["age"])?;
// returns default value from schema
assert_eq!(age, Some(0u16));
println!("\nage: {}", age.unwrap());
// close again
let user_bytes: Vec = user_buffer.close();
// we can now save user_bytes to disk,
// send it over the network, or whatever else is needed with the data
println!("bytes: {:?}", user_bytes);
Ok(())
}
================================================
FILE: idl.graphql
================================================
# WIP IDL ideas...
spec {
id: "My Schema",
author: "Scoot Loot",
version: 1.2
}
import "../file"
# comment
struct self::position () {
x: X,
y: X
}
struct user {
name: string (default: "Billy"),
age: u32,
email: Option,
other_user: struct {
name: String,
email: String
},
position: self::position,
posts: list { post }
}
Vec> myType;
struct post {
title: string,
content: string
}
impl user () {
fn get_user() -> Result
}
list self::user_list () { string }
union self::union () {
opt1: string
opt2: string2
}
enum myEnum () { red, orange, yellow }
enum Option (dflt: None) {
None
Some(X)
}
enum Result (id: 12, dflt: Unset) {
Unset
Ok(X),
Err(Y),
Something { value: u32, another: u32 }
}
string namedString (id: 2, size: 20, default: 'hello')
tuple someTuple (id: 3, sorted: true) { string, string, string }
// // this is a comment
// struct({fiels: {
// name: string({default: "default value here", size: 20}),
// tags: list({of: string()}),
// tuple: tuple({sorted: true, values: [string(), string(), string()]}),
// map: map({values: string()}),
// // another comment
// enum: option({default: "red", choices: ["red", "blue", "orange"]}),
// p: portal({to: "map"}),
// nested: struct({fiels: {
// name: string(),
// value: u32({default: 20}),
// geo: geo({size: 4, default: {lat: 20, lng: 20.28}}),
// }})
// }});
// rpc_spec({
// name: "Test API",
// author: "hello",
// version: "1.0.0",
// spec: (self, mod) => {
// msg("send_name", struct());
// rpc("your_face", fn(self.send_name), option(self.send_name));
// rpc("your_face", fn(self.argument), result(self.send_name, self.error));
// rpc("your_face", fn(self.argument), empty());
// mod("mod_name", (self) => {
// });
// }
// });
// struct({
// name: string(),
// age: u16({default: 0}),
// tags: list({of: string()})
// });
//! let user_factory = NP_Factory::new(r#"{
//! "type": "struct",
//! "fields": [
//! ["name", {"type": "string"}],
//! ["age", {"type": "u16", "default": 0}],
//! ["tags", {"type": "list", "of": {
//! "type": "string"
//! }}]
//! ]
//! }"#)?;
================================================
FILE: no_proto_js/Cargo.toml
================================================
[package]
name = "no_proto_js"
version = "0.1.0"
authors = ["Scott Lott "]
edition = "2018"
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
crate-type = ["cdylib"]
[dependencies]
wasm-bindgen = "0.2"
wee_alloc = "0.4.5"
[profile.release]
lto = true
opt-level = 'z'
================================================
FILE: no_proto_js/out.txt
================================================
(module
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
(type $i32_i32_=>_none (func (param i32 i32)))
(type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32)))
(type $i32_=>_none (func (param i32)))
(type $i32_i32_i32_i32_i32_i64_i64_i32_=>_none (func (param i32 i32 i32 i32 i32 i64 i64 i32)))
(type $i32_i32_i32_=>_none (func (param i32 i32 i32)))
(type $i32_=>_i32 (func (param i32) (result i32)))
(type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32)))
(type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32)))
(type $none_=>_none (func))
(type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32)))
(type $i32_i64_=>_none (func (param i32 i64)))
(type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32)))
(type $i32_=>_i64 (func (param i32) (result i64)))
(type $f64_=>_f64 (func (param f64) (result f64)))
(type $i32_i32_i32_i32_i64_i64_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i64 i64 i32 i32 i32 i32)))
(type $i32_i64_i32_=>_none (func (param i32 i64 i32)))
(type $i32_i64_i64_=>_none (func (param i32 i64 i64)))
(type $i32_i64_i64_i64_i64_=>_none (func (param i32 i64 i64 i64 i64)))
(type $i32_f64_=>_none (func (param i32 f64)))
(type $i32_i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32 i32) (result i32)))
(type $i64_i32_i32_=>_i32 (func (param i64 i32 i32) (result i32)))
(type $f64_=>_i32 (func (param f64) (result i32)))
(type $i32_=>_f64 (func (param i32) (result f64)))
(type $i32_i32_i64_f64_=>_f64 (func (param i32 i32 i64 f64) (result f64)))
(import "./no_proto_js_bg.js" "__wbindgen_throw" (func $wasm_bindgen::__wbindgen_throw::h14423dcd903c052c (param i32 i32)))
(memory $0 17)
(data (i32.const 1048576) "/Users/scottlott/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/str/pattern.rs\00\00\00\10\00s\00\00\00\b0\01\00\00&\00\00\00src/json_flex.rs\84\00\10\00\10\00\00\00@\00\00\00\10\00\00\00\84\00\10\00\10\00\00\00A\00\00\00\11\00\00\00\84\00\10\00\10\00\00\00N\00\00\00\10\00\00\00\84\00\10\00\10\00\00\00O\00\00\00\"\00\00\00\84\00\10\00\10\00\00\00\t\02\00\00\17\00\00\00 \00\00\00nullJSON Parse ErrorfalsetrueJSON Parse Error: Unknown chain from Arraycapacity overflowP\01\10\00\1c\00\00\00\19\02\00\00\05\00\00\00library/alloc/src/raw_vec.rsassertion failed: e >= table::MIN_E\00\9a\1a\10\00)\00\00\00\11\00\00\00\05\00\00\00<\a8\ab)).\b6\e0&I\0b\ba\d9\dcq\8co\1b\8e(\10T\8e\afK\a2\b12\14\e9q\dbo\05\af\9f\ac1\'\89\ca\c6\9a\c7\17\fep\ab}x\81\b9\9d=M\d6N\eb\f0\93\82F\f0\85\"&\ed8#Xl\a7\aao(\07,nG\d1\caEy\84\db\a4\cc\82=\97\97e\12\ce\7f\a3\0c}\fd\fe\96\c1_\ccO\dc\bc\be\fc\b1w\ff\b1\t6\f7=\cf\aa\9f\1e\8c\03u\0d\83\95\c7%oD\d2\d0\e3z\f9w\c5j\83b\ce\ec\9b\d5vE$\fb\01\e8\c2\8a\d4V\edy\02\a2\f3\d7DV4\8cAE\98\0c\d6kA\ef\91V\be\8f\cb\c6\11k6\ec\ed9?\1c\eb\02\a2\b3\94\08O\e3\a5\83\8a\e0\b9\ca\"\\\8f$\adX\e8\be\95\99\d96l7\91.\fb\ff\8fDG\85\b5\f9\f9\ff\b3\15\99\e6\e2<\fc\7f\90\ad\1f\d0\8dK\fb\9f\f4\98\'D\b1\1d\fa\c71\7f1\95\ddR\fc\1c\7f\ef>}\8ag;\e4^\ab\8e\1c\adAJ\9d6V\b2c\d8hN\"\e2uO>\87\02\e2\aaZS\e3\0d\a9\83\9aU1(\\Q\d3\92\80\d5\1e\99\d9\12\84\b6\e0\8af\ff\8f\17\a5\e4\98-@\ffs]\ce\8e\7f\1c\88\7fh\fa\80r\9f#j\9f\029\a1O\87\acDGC\87\c9\"\a9\d7\15\19\14\e9\fb\b5\c9\a6\ad\8f\acq\9d#|\10\99\b3\17\ce\c4+\9bT\7f\a0\9d\01\f6\fb\e0\94O\84\02\c1\99:\19zc%C1\c0\88\9fX\bc\ee\93=\f0\b5c\b75u|&\96\a3<%\83\92\1b\b0\bb\cb\8b\ee#w\"\9c\ea_\17uv\8a\95\a1\927]\12\14\ed\faI\b7\85\f4\16Y\a8y\1c\e5\d3X\ae7\t\cc1\8f\08\ef\99\85\0b?\fe\b2\c9j\00g\ce\ce\bd\df\beB`\00A\a1\d6\8bmSx@\91I\cc\aeIh\96\90\f5[\7f\da-\01^zy\99\8f\88y\81\f5\d8\d7\7f\b3\aa\d7\e12\cf\cd_`\d5&\cd\7f\a1\e0;\\\85p\c0\df\c9\d8J\b3\a6\8c\b0W\fc\8e\1d`\d0W\ce\b6]y\12<\82\ed\81$\b5\17\17\cb\a2i\a2m\a2\dd\dc}\cb\03\0b\t\0b\15T]\fe\e2\a6\e5&\8dT\fa\9e\9a\10\9fp\b0\e9\b8\c6\c1\d4\c6\8c\1c$g\f8\f8D\fc\d7\91v@\9b7V\fbM6\94\10\c2\c4+z\e1C\b9\94\f2[[\ecl\ca\f3\9c\971r\'\08\bd0\84\bd\beN1J\ec<\e5\ec7\d1^\ae\13F\0f\94\84\85\f6\99\98\17\13\b9\e5&t\c0~\ddW\e7O\98H8o\ea\96\90c\beZ\06\0b\a5\bc\b4\fcm\f1\c7M\ce\eb\e1\bd\e4\f6\9c\f0`3\8d\ed\9d4\c4,9\80\b0h\c5A\f5wG\a0\dca\1bI\f9\aa,\e4\899b\9b\b7\d57]\ac\c7:\82%\cb\85t\d7\bddq\f7\9e\d3\a8\86\ec\bdM\b5\86\08S\a8g-\a1b\a8\cag\d2`\bc\a4=\a9\de\80\83x\eb\0d\8dS\16a\a4VfQp\e8[y\cd\f6\df2Fq\d9k\80\f4\97\bf\97\cd\cf\86\a0\f0}\af\fd\c0\83\a8\c8l]\1b=\b1\a4\d2\fad\1a1\c6\ee\a6\c3\9c\fd`\bdw\aa\90\f4\c3<\b9\ac\15\d5\b4\f1\f4\c5\f3\8b-\05\11\17\99\b7\f0\eexF\d5\\\bf\e5\ac*\17\98\n4\ef\0f\acz\0e\9f\86\80\95\13W\19\d2F\a8\e0\ba\d7\ac\9f\86X\d2\98\e9\06\cc#Tw\83\ff\91\08\bf,)Ud\7f\b6\ca\eewsj=\1f\e4>\f5*\88b\86\93\8e\8e\b25*\fbg8\b21\1f\c3\f4\f9\81\c6\de\7f\f3\f98<\11<\8b_p8G\8b\15\0b\aev\8c\06\19\ee\da\8d\d9\ca\17\a4\cf\d4\a8\f8\87\bc\1d\8d\03\n\d3\f6\a9+ep\84\cc\87t\d4;?\c6\d2\df\d4\c8\84\n\cfw\c7\17\n\fb\a5\cc\c2U\b9\9d\ccy\cf\c0\99\d5\93\e2\1f\ac\810\00\cb8\db\'\17\a2<\c0\fd\06\d2\f1\9c\caK0\bd\88F.D\fd/>v\15\ec\9cJ\9e\ba\cd\d3\1a\'D\dd\c5)\c1\88\e10\95T\f7\bax\f5\8c>\dd\94\9a\e8\d620\8e\14:\c1\a2\8c?\bc\b1\99\88\f1\e5\b7\a7\15\0f`\f5\96\de\a5\11\db\12\b8\b2\bcV\0f\d6\91\17f\df\eb\96\c9%\bb\ce\9fk\93\fb;\efi\c2\87F\b8\fa\nk\04\b3)X\e6\dc\e6\c2\e2\0f\1a\f7\8f\93\a0s\db\93\e0\f4\b3\b8\88P\d2\b8\18\f2\e0sUr\83sO\97\8c\d0\eaNdP#\bd\af\84\a5b}$l\ac\dbr\a7]\ce\96\c3K\89O\11\f5\81|\b4\9e\ab\a3Ur\a2\9ba\86\d6\86u\87E\01\fd\13\86\e7R\e9\96A\fc\98\a7\a1\a7\a3\fcQ;\7f\d1\c5H\e6=\13\85\ef\82\f6\da_\0dXf\ab\a3\b3\d1\b7\10\ee?\96\cc \c6\e5\94\e9\cf\bb\ff\d4\9b\0f\fd\f1a\d5\9f\c9\82S|n\ba\ca\c7{ch\1b\ni\bd\f9->!Q\a6a\16\9c\b8\8di\e5\0f\fa\1b\c3&\f1\c3\de\93\f8\e2\f3\b8v:k\\\dbm\98f\14\t\863R\89\be\7fY\8bg\c0\a6+\ee\f0\17\b7@8H\db\94\ec\dd\e4PF\1a\12\baf\15\1e\e5\d7\a0\96\e8`\cd2\ef\86$^\91\b8\80\ff\aa\a8\ad\b5\b5\e6`\bf\d5\12\19#\e3\90\9c\97\c5\ab\ef\f5\8d\b4\83\fd\b6\96ks\b1\a1\e4\bcd|F\d0\dd\e4\0e\f6\be\0d,\a2\8a\9e\92\b3.\11\b7J\adEw`z\d5d\9d\d8\8bJ|l\05_b\87.]\9b\c7\c6\f6:\a9y4\82yx\b4\89\d3\cc`\f1K\cb\106\84\ff\b8\ed\1e\fe\94C\a5>\'\a9\a6=z\94\ce\87\b8)\88f\cc\1c\81\a9&4*\80\ffc\a1S0\c14`\ff\bc\c9h|\f1A8?,\fc\c1\ed6)\83\a7\9b\9d1\a9\84\f3c\91\02\c5}\d3e\f0\bc5C\f6.\a4?\16\96\01\ea\99:\8d\cf\9b\fb\81d\c0\88p\c3\82z\a2}\f0U&\ba\91\8c\85N\96\eb\af(\b6\ef&\e2\bb\e5\db\b2\a3\ab\b0\da\eao\c9OFk\ae\c8\92\cb\bb\e3\17\06\daz\b7\be\aa\dc\9d\87\90Y\e5\b7\ea\a9\c2T\faW\8fdeT\f3\e9\f8-\b3\bd~)p$w\f9\df6\ef\19\c6v\ea\fb\8b\04k\a0w\14\e5\fa\ae\c5\85\88\95Y\9e\b9\da\9bSu\fd\f7\02\b4\88\82\a8\d2\fc\b5\03\e1\aa\a2R\07|\a3D\99\d5\a5\93\84-\e6\ca\7f\85\8f\b8\e5\b8\9f\bd\df\a6\b2&\1f\a7\07\ad\97\d00xs\c8$\cc^\82;V\90\fa-\7f\f6\a2\cak4y\f9\1e\b4\cb\bd\86\81\d7\b7&\a1\fe6\f4\b0\e62\b8$\9fD1]\a0?\e6\ed\c6\94}t\88\cf_\a9\f8}\ceH\b5\e1\dbi\9b\1c\02\9b\"\daRD\c2\a3\c2A\ab\90g\d5\f2\a6\19\tk\ba`\c5\97\0f`\cb\05\e9\b8\b6\bd\138>G#g$\ed\0c\e3\86\0cv\c06\94\cf\9b\a8\8f\93pD\b9\c3\c2\92s\b8\8c\95\e7\ba\b9;H\f3w\bd\90(\a8J\1a\f0\d5\ec\b42R\dd l\0b(\e2_S\8a\94#\07Y\8d7\e8\acy\ecH\af\b0E\"\18\98\'\1b\db\dck\15\0f\bf\f8\f0\08\8a\c6\da\d2\ee6-\8b\acw\91\87\aa\84\f8\ad\d7\eb\ba\94\eaR\bb\cc\86\a5\e99\a5\'\ea\7f\a8\0fd\88\8e\b1\e4\9f\d2\89>\15\f9\ee\ee\a3\83+\8eZ\b7\aa\ea\8c\a4\b611eU%\b0\cd\12\bf>_U\17\8e\80\d6n\0e\b7*\9d\b1\a0\8c\n\d2du\04\de\c8/\8d\06\be\92\85\15\fb=\18\c4\b6{s\ed\9cM\1eu\a4Z\d0(\c4\e0e\92Mq\043\f5\ac\7f{\d0\c6\e2?\99\97_\9a\84x\db\8f\bf}\f7\c0\a5V\d2s\ef\ae\9a\98\'vc\a8\95Y\c1~\b1S|\12\bb\b0q\de\9dh\1b\d7\e9\0e\07\abb!q&\92\d1\c8U\bbi\0d\b0\b6\06;+*\c4\10\\\e4\e3\04[\9az\8a\b9\8e\1c\c6\f1@\19\edg\b2\a37.\91_\e8\01\df\c6\e2\bc\ba;1a\8bx\1bl\a9\8a}9\aeV\"\c7S\ed\dc\c7\d9uu\\T\14\ea\1c\88\d3\92si\99$$\aa\88w\d0\c3\bf-\ad\d4\b5Jb\da\97<\ec\84b\dd\fa\d0\bdK\'\a6\ba\949E\ad\1e\b1\cf\f5\fcCK,\b3\ce\812\fc\14^\f7_B\a2>;\9a5\f5\f7\d2\ca\0e\ca\00\83\f2\b5\87\fdH~\e0\91\b7\d1t\9e\db\9dXv%\06\12\c6Q\c5\ee\d3\ae\87\96\f7S;uD\cd\14\be\9a\'\8a\92\95\00\9am\c1\b1,\f7\ba\80\00\c9\f1\ef{\datP\a0\1d\97\eb\1a\11\92d\08\e5\bc\a5a\95\b6}J\1e\ec\07]\1d\92\8e\ee\92\93I\b4\a462\aaw\b8[\e1M\c4\be\94\95\e6\d9\ac\b0:\f7|\1d\90\0f\d8\\\t5\dc$\b4\13\0e\b4KB\13.\e1\cc\88Po\t\cc\bc\8c\ff\aa$\cb\0b\ff\eb\af\bf\d5\ed\bd\ce\fe\e6\db\97\a5\b46A_p\89\fd\cea\84\11w\cc\ab\bcBz\e5\d5\94\bf\d6\b6il\af\05\bd7\86#\84G\1bG\ac\c5\a7,e\19\e2X\17\b7\d1;\dfO\8d\97n\12\83\n\d7\a3p=\n\d7\a3\cd\cc\cc\cc\cc\cc\cc\cc\00\00\00\00\00\00\00\80\00\00\00\00\00\00\00\a0\00\00\00\00\00\00\00\c8\00\00\00\00\00\00\00\fa\00\00\00\00\00\00@\9c\00\00\00\00\00\00P\c3\00\00\00\00\00\00$\f4\00\00\00\00\00\80\96\98\00\00\00\00\00 \bc\be\00\00\00\00\00(k\ee\00\00\00\00\00\f9\02\95\00\00\00\00@\b7C\ba\00\00\00\00\10\a5\d4\e8\00\00\00\00*\e7\84\91\00\00\00\80\f4 \e6\b5\00\00\00\a01\a9_\e3\00\00\00\04\bf\c9\1b\8e\00\00\00\c5.\bc\a2\b1\00\00@v:k\0b\de\00\00\e8\89\04#\c7\8a\00\00b\ac\c5\ebx\ad\00\80z\17\b7&\d7\d8\00\90\acn2x\86\87\00\b4W\n?\16h\a9\00\a1\ed\cc\ce\1b\c2\d3\a0\84\14@aQY\84\c8\a5\19\90\b9\a5o\a5:\0f \f4\'\8f\cb\ce\84\t\94\f8x9?\81\e5\0b\b96\d7\07\8f\a1\dfNg\04\cd\c9\f2\c9\96\"\81E@|o\fc\9e\b5p+\a8\ad\c5\9d\05\e3L6\12\197\c5\c7\1b\e0\c3V\df\84\f6\\\11l:\96\0b\13\9a\b3\15\07\c9{\ce\97\c0 \dbH\bb\1a\c2\bd\f0\f4\88\0d\b5P\99v\961\ebP\e2\a4?\14\bc\fd%\e5\1a\8eO\19\eb\be7\cf\d0\b8\d1\ef\92\ae\05\03\05\'\c6\ab\b7\19\c7C\c6\b0\b7\96\e5p\\\ea{\ce2~\8f\8c\f3\e4\1a\82\bf]\b3o0\9e\a1b/5\e0E\de\02\a5\9d=!\8c\d7\95C\0e\05\8d)\afL{\d4QF\f0\f3\da\10\cd$\f3+v\d8\88T\00\ee\ef\b6\93\0e\abh\80\e9\ab\a48\d2\d5A\f0q\ebfc\a3\85RlN\a6@<\0c\a7f\07\e2\cfPK\cf\d0\a0D\ed\81\12\8f\81\82\c8\95h\"\d7\f2!\a3:\bb\02\eb\8co\ea\cb\08j\c3%p\0b\e5\feE\"\9a\17&\'O\9f\d6\aa\80\9d\ef\f0\"\c7\8c\d5\e0\84+\ad\eb\f8w\85\0c3;L\93\9b\d5\a6\cf\ffI\1fx\c2\8b\90\c3\7f\1c\'\16\f3W:\da\cfq\d8\ed\97\ec\c8\d0C\8eN\e9\bd\'\fb\c4\d41\a2c\ed\f9\1c\fb$_E^\947\e49\ee\b6\d6u\b9D]\c8\a9dL\d3\e7K:\1d\ea\be\0f\e4\90\dd\88\a4\a4\ae\13\1d\b5\15\ab\cdM\9aXd\e2\ed\8a\a0p`\b7~\8d\a8\ad\c8\8c8e\de\b0\12\d9\fa\af\86\fe\15\dd\ab\c7\fc-\14\bf-\8a\96\f9{9\d9.\b9\ac\fc\f7\da\87\8fz\e7\d7\fd\da\e8\b4\99\ac\f0\86\bd\11#\"\c0\d7\ac\a8,\d6\ab*\b0\0d\d8\d2\dbe\ab\1a\8e\08\c7\83R?V\a1\b1\ca\b8\a4\'\cf\ab\t^\fd\e6\cdxa\0b\c6Z^\b0\80\d69\8ew\f1u\dc\a0L\c8q\d5m\93\13\c9_:\ceJIxX\fb{\e4\c0\ce-K\17\9d\9a\1dqB\f9\1d]\c4\01e\0d\93wet\f5 _\e8\bbj\bfh\99\e9v\e2jE\ef\c2\bf\a3\14\9b\c5\16\ab\b3\ef\e6\ec\80;\eeJ\d0\95\1f(a\ca\a9]D\bb\'r\f9<\14u\15\eaX\e7\1b\a6,iM\92.\e1\a2\cfw\c3\e0\b6z\99\8b\c3U\f4\98\e4\ec?7\9a\b5\98\df\8e\e7\0f\c5\00\e3~\97\b2\e1S\f6\c0\9b^=\dfm\f4\99X![\86\8b\88q\c0\ae\e9\f1g\ae\ea\8dp\1ad\ee\01\da\b2X\86\90\fe4A\88\df\ee\a74>\82Q\aa\96\ea\d1\c1\cd\e2\e5\d4\9e2#\99\c0\ad\0f\85F\ffk\bf0\99S\a6\17\ffF\ef|\7f\e8\cfn_\8c\15\aeO\f1\81Jw\ef\9a\99\a3m\a2\1cU\ab\01\80\0c\t\cbc*\16\02\a0O\cb\fd~\daM\01\c4\11\9f\9e\1eQ\a1\015\d6F\c6e\a5\tB\c2\8b\d8\f7_\07FiYW\e7\9a7\89\97\c3/-\a1\c1\85k}\b4{x\t\f23c\cePM\ebE\97\00\fc\01\a5 f\17\bd\00{B\ce\a8?]\ec\e0\8c\e9\80\c9G\ba\93\18\f0#\e1\bb\d9\a8\b8\1e\ecl\d9*\10\d3\e6\93\13\e4\c7\1a\eaC\90w\18\ddy\a1\e4T\b4\95^T\d8\c9\1dj\e1\1d\bb4\'\9eR\e2\8c\e4\e9\01\b1E\e7\1a\b0]dB\1d\17\a1!\dc\ba~Ir\ae\04\95\89i\de\db\0e\daE\fa\ab\03\d6\92\92P\d7\f8\d6\c2\c5\9b[\92\86[\863\b7\82\f26h\f2\a7\ffd#\afD\02\ef\d1\1f\1fv\edja5\83\e7\a6\d3\a8\c5\b9\02\a4\a1\90\08\137h\03\cdeZ\e5k\"!\"\80\fe\b0\de\06k\a9*\a0=]\96\c8\c5S5\c8\8d\f4\bb:\b7\a8B\fa\d8x\b5\84r\a9i\9c\0e\d7\e2%\cf\13\84\c3\d1\8c[\ef\c2\18e\f4\038\99\d5y/\bf\98\04\86\ffJX\fb\ee\be\85g\bf].\ba\aa\ee\b3\a0\97\fa\\\b4*\95\e0\88=9tau\ba\17\eb\8cG\d1\b9\12\e9\ef\12\b8\cc\"\b4\ab\91\aa\17\e6\7f+\a1\16\b6\95\9d\df_vI\9c\e3}\c2\eb\fb\e9\adA\8e\1c\b3\e6zd\19\d2\b1\e3_\a0\99\bd\9fF\de\ee;\04\80\d6#\ec\8a\eaJ\05 \cc,\a7\ad\a4\9d\06(\ff\f7\10\d9\87\"\04y\ff\9a\aa\87(+EW\bfA\95\a9\f2u\16-/\92\fa\d3\b7\t.|]\9b|\84%\8c9\db4\c2\9b\a5/\ef\07\12\c2\b2\02\cf}\f5DK\b9\afa\81\dc2\16\9e\a7\1b\ba\a1\93\bf\9b\85\91\a2(\cax\af\02\e75\cb\b2\fc\ab\ada\b0\01\bf\ef\9d\16\19z\1c\c2\aek\c5\\\9f\98\a3r\9a\c6\f6\99c?\a6\87 <\9a\80<\cf\8f\a9(\cb\c0\9f\0b\c3\f3\d3\f2\fd\f0D\e7Yx\c4\b7\9e\96\15ap\96\b5eF\bcZy\0c\fc\"\ffW\eb\d8\cb\87\ddu\ff\16\93\ce\be\e9TS\bf\dc\b7\82.$*(\ef\d3\e5\11\9dV\1ayu\a4\8fUD\ec`\d7\92\8d\b3kU\'9\8d\f7p\e0c\95\b8C\b8\9aF\8c\bb\ba\a6TfAX\afji\d0\e9\bfQ.\db\e2A\"\f2\17\f3\fc\88[\d2\aa\ee\dd/<\ab\f2\86Uj\d5;\0b\d6Wtube\05\c7\85m\d1\12\bb\be\c68\a7\c8\85\d7in\f8\06\d1\9d\b3&\02E[\a4\82\84`\b0B\16rM\a3\a5x\\\d3\9b\ce \cc\ce\963\c8B\02)\ffA> \bdi\a1y\9f\d1Mh,\c4\tX\c7Fa\8275\0c.\f9\cc|\b1B\a1\c7\bc\9b\fe\db]\93\89\f9\ab\c2\feR5\f8\eb\f7V\f3\dfS!{\f3Z\16\98\d6\a8\e9Y\b0\f1\1b\be\0c\13dp\1c\ee\a2\ed\e8\8b>\c6\d1\d4\85\94\e1.\ce7\06J\a7\b9\9a\ba\c1\c5\87\1c\11\e8\a0\14\99\db\d4\b1\n\91\c8Y\7f\12J^M\b5:0\1f\97\dc\b5\a0\e2$~s\de\a9q\a4\8d\ad]\10V\14\8e\0d\b1\19u\94k\99\f1P\dd0\c9<\e3\ff\96R\8a{\fb\0b\dc\bf<\e7\acZ\fa\0e\d3\ef\0b!\d8x\\\e9\e3u\a7\14\87\96\b3\e3\\S\d1\d9\a8|\a0\1c4\a8E\10\d3N\e4\91 \89+\ea\83a]\b6hk\b6\e4\a4\b9\f4\e3B\06\e4\1d\ce\f4x\ce\e9\83\ae\d2\801\17B\e4$Z\07\a1\fd\9cR\1d\ae0I\c9\02B\02E\02H\02L\02O\02R\02V\02Y\02\\\02`\02c\02f\02i\02m\02p\02s\02w\02z\02}\02\81\02\84\02\87\02\8b\02\8e\02\91\02\95\02\98\02\9b\02\9f\02\a2\02\a5\02\a9\02\ac\02\af\02\b3\02\b6\02\b9\02\bd\02\c0\02\c3\02\c7\02\ca\02\cd\02\d0\02\d4\02\d7\02\da\02\de\02\e1\02\e4\02\e8\02\eb\02\ee\02\f2\02\f5\02\f8\02\fc\02\ff\02\02\03\06\03\t\03\0c\03\10\03\13\03\16\03\1a\03\1d\03 \03$\03\'\03*\03-\031\034\037\03;\03>\03A\03E\03H\03K\03O\03R\03U\03Y\03\\\03_\03c\03f\03i\03m\03p\03s\03w\03z\03}\03\81\03\84\03\87\03\8b\03\8e\03\91\03\94\03\98\03\9b\03\9e\03\a2\03\a5\03\a8\03\ac\03\af\03\b2\03\b6\03\00\00\a0\19\10\00 \00\00\00\c0\19\10\00\12\00\00\00 \00\00\00\00\00\00\00\01\00\00\00!\00\00\00index out of bounds: the len is but the index is 00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899library/core/src/num/dec2flt/algorithm.rsassertion failed: digits < 40\f0\1a\10\00\1e\00\00\00\e3\01\00\00\01\00\00\00library/core/src/num/bignum.rs\00\00 \1b\10\00\10\00\00\000\1b\10\00\"\00\00\00range end index out of range for slice of length assertion failed: x.bit_length() < 64\00\98\1b\10\00#\00\00\00A\00\00\00\05\00\00\00\98\1b\10\00#\00\00\00C\00\00\00\16\00\00\00library/core/src/num/dec2flt/num.rsassertion failed: end - start <= 64\00\00\98\1b\10\00#\00\00\00K\00\00\00\05\00\00\00\00\1c\10\00%\00\00\00W\00\00\00\07\00\00\00library/core/src/num/dec2flt/parse.rslibrary/core/src/num/dec2flt/rawfp.rs\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00$@\00\00\00\00\00\00Y@\00\00\00\00\00@\8f@\00\00\00\00\00\88\c3@\00\00\00\00\00j\f8@\00\00\00\00\80\84.A\00\00\00\00\d0\12cA\00\00\00\00\84\d7\97A\00\00\00\00e\cd\cdA\00\00\00 _\a0\02B\00\00\00\e8vH7B\00\00\00\a2\94\1amB\00\00@\e5\9c0\a2B\00\00\90\1e\c4\bc\d6B\00\004&\f5k\0cC\00\80\e07y\c3AC\00\a0\d8\85W4vC\00\c8Ngm\c1\abC\00=\91`\e4X\e1C@\8c\b5x\1d\af\15DP\ef\e2\d6\e4\1aKD\92\d5M\06\cf\f0\80D%\1c\10\00%\00\00\00\e8\00\00\00\t\00\00\00big_to_fp: unexpectedly, input is zero\00\00%\1c\10\00%\00\00\004\01\00\00\05\00\00\00invalid float literalcannot parse float from empty string\00\00\00\ac\1d\10\00#\00\00\00\db\00\00\00#\00\00\00\ac\1d\10\00#\00\00\00\dc\00\00\00#\00\00\00library/core/src/num/dec2flt/mod.rs[...]4\1e\10\00\0b\00\00\00z(\10\00\16\00\00\00s\1e\10\00\01\00\00\00X(\10\00\0e\00\00\00f(\10\00\04\00\00\00j(\10\00\10\00\00\00s\1e\10\00\01\00\00\004\1e\10\00\0b\00\00\00?\1e\10\00&\00\00\00e\1e\10\00\08\00\00\00m\1e\10\00\06\00\00\00s\1e\10\00\01\00\00\00byte index is not a char boundary; it is inside (bytes ) of ``\b7\1e\10\00\02\00\00\00\9c\1e\10\00\1b\00\00\00c\04\00\00$\00\00\00\9c\1e\10\00\1b\00\00\00Y\04\00\00\11\00\00\00library/core/src/fmt/mod.rs..\00\00\00\f2\1e\10\00\1b\00\00\00T\00\00\00\14\00\00\000x\00\00\e0\1e\10\00\12\00\00\000\1b\10\00\"\00\00\00range start index library/core/src/fmt/num.rs\00\01\03\05\05\06\06\03\07\06\08\08\t\11\n\1c\0b\19\0c\14\0d\10\0e\0d\0f\04\10\03\12\12\13\t\16\01\17\05\18\02\19\03\1a\07\1c\02\1d\01\1f\16 \03+\03,\02-\0b.\010\031\022\01\a7\02\a9\02\aa\04\ab\08\fa\02\fb\05\fd\04\fe\03\ff\t\00v$\10\00%\00\00\00\n\00\00\00\1c\00\00\00\adxy\8b\8d\a20WX\8b\8c\90\1c\1d\dd\0e\0fKL\fb\fc./?\\]_\b5\e2\84\8d\8e\91\92\a9\b1\ba\bb\c5\c6\c9\ca\de\e4\e5\ff\00\04\11\12)147:;=IJ]\84\8e\92\a9\b1\b4\ba\bb\c6\ca\ce\cf\e4\e5\00\04\0d\0e\11\12)14:;EFIJ^de\84\91\9b\9d\c9\ce\cf\0d\11)EIWde\8d\91\a9\b4\ba\bb\c5\c9\df\e4\e5\f0\0d\11EIde\80\84\b2\bc\be\bf\d5\d7\f0\f1\83\85\8b\a4\a6\be\bf\c5\c7\ce\cf\da\dbH\98\bd\cd\c6\ce\cfINOWY^_\89\8e\8f\b1\b6\b7\bf\c1\c6\c7\d7\11\16\17[\\\f6\f7\fe\ff\80\0dmq\de\df\0e\0f\1fno\1c\1d_}~\ae\af\bb\bc\fa\16\17\1e\1fFGNOXZ\\^~\7f\b5\c5\d4\d5\dc\f0\f1\f5rs\8ftu\96/_&./\a7\af\b7\bf\c7\cf\d7\df\9a@\97\980\8f\1f\c0\c1\ce\ffNOZ[\07\08\0f\10\'/\ee\efno7=?BE\90\91\fe\ffSgu\c8\c9\d0\d1\d8\d9\e7\fe\ff\00 _\"\82\df\04\82D\08\1b\04\06\11\81\ac\0e\80\ab5(\0b\80\e0\03\19\08\01\04/\044\04\07\03\01\07\06\07\11\nP\0f\12\07U\07\03\04\1c\n\t\03\08\03\07\03\02\03\03\03\0c\04\05\03\0b\06\01\0e\15\05:\03\11\07\06\05\10\07W\07\02\07\15\0dP\04C\03-\03\01\04\11\06\0f\0c:\04\1d%_ m\04j%\80\c8\05\82\b0\03\1a\06\82\fd\03Y\07\15\0b\17\t\14\0c\14\0cj\06\n\06\1a\06Y\07+\05F\n,\04\0c\04\01\031\0b,\04\1a\06\0b\03\80\ac\06\n\06!?L\04-\03t\08<\03\0f\03<\078\08+\05\82\ff\11\18\08/\11-\03 \10!\0f\80\8c\04\82\97\19\0b\15\88\94\05/\05;\07\02\0e\18\t\80\b3-t\0c\80\d6\1a\0c\05\80\ff\05\80\df\0c\ee\0d\03\84\8d\037\t\81\\\14\80\b8\08\80\cb*8\03\n\068\08F\08\0c\06t\0b\1e\03Z\04Y\t\80\83\18\1c\n\16\tL\04\80\8a\06\ab\a4\0c\17\041\a1\04\81\da&\07\0c\05\05\80\a5\11\81m\10x(*\06L\04\80\8d\04\80\be\03\1b\03\0f\0d\00v$\10\00%\00\00\00\1a\00\00\006\00\00\00\00\06\01\01\03\01\04\02\08\08\t\02\n\05\0b\02\0e\04\10\01\11\02\12\05\13\11\14\01\15\02\17\02\19\0d\1c\05\1d\08$\01j\03k\02\bc\02\d1\02\d4\0c\d5\t\d6\02\d7\02\da\01\e0\05\e1\02\e8\02\ee \f0\04\f8\02\f9\02\fa\02\fb\01\0c\';>NO\8f\9e\9e\9f\06\07\t6=>V\f3\d0\d1\04\14\1867VW\7f\aa\ae\af\bd5\e0\12\87\89\8e\9e\04\0d\0e\11\12)14:EFIJNOde\\\b6\b7\1b\1c\07\08\n\0b\14\1769:\a8\a9\d8\d9\t7\90\91\a8\07\n;>fi\8f\92o_\ee\efZb\9a\9b\'(U\9d\a0\a1\a3\a4\a7\a8\ad\ba\bc\c4\06\0b\0c\15\1d:?EQ\a6\a7\cc\cd\a0\07\19\1a\"%>?\c5\c6\04 #%&(38:HJLPSUVXZ\\^`cefksx}\7f\8a\a4\aa\af\b0\c0\d0\ae\afy\ccno\93^\"{\05\03\04-\03f\03\01/.\80\82\1d\031\0f\1c\04$\t\1e\05+\05D\04\0e*\80\aa\06$\04$\04(\084\0b\01\80\90\817\t\16\n\08\80\989\03c\08\t0\16\05!\03\1b\05\01@8\04K\05/\04\n\07\t\07@ \'\04\0c\t6\03:\05\1a\07\04\0c\07PI73\0d3\07.\08\n\81&RN(\08*V\1c\14\17\tN\04\1e\0fC\0e\19\07\n\06H\08\'\tu\0b?A*\06;\05\n\06Q\06\01\05\10\03\05\80\8bb\1eH\08\n\80\a6^\"E\0b\n\06\0d\139\07\n6,\04\10\80\c0\00\00\00\00p\00\07\00-\01\01\01\02\01\02\01\01H\0b0\15\10\01e\07\02\06\02\02\01\04#\01\1e\1b[\0b:\t\t\01\18\04\01\t\01\03\01\05+\03w\0f\01 7\01\01\01\04\08\04\01\03\07\n\02\1d\01:\01\01\01\02\04\08\01\t\01\n\02\1a\01\02\029\01\04\02\04\02\02\03\03\01\1e\02\03\01\0b\029\01\04\05\01\02\04\01\14\02\16\06\01\01:\01\01\02\01\04\08\01\07\03\n\02\1e\01;\01\01\01\0c\01\t\01(\01\03\019\03\05\03\01\04\07\02\0b\02\1d\01:\01\02\01\02\01\03\01\05\02\07\02\0b\02\1c\029\02\01\01\02\04\08\01\t\01\n\02\1d\01H\01\04\01\02\03\01\01\08\01Q\01\02\07\0c\08b\01\02\t\0b\06J\02\1b\01\01\01\01\017\0e\01\05\01\02\05\0b\01$\t\01f\04\01\06\01\02\02\02\19\02\04\03\10\04\0d\01\02\02\06\01\0f\01\00\03\00\03\1d\03\1d\02\1e\02@\02\01\07\08\01\02\0b\t\01-\03w\02\"\01v\03\04\02\t\01\06\03\db\02\02\01:\01\01\07\01\01\01\01\02\08\06\n\02\010\11?\040\07\01\01\05\01(\t\0c\02 \04\02\02\01\038\01\01\02\03\01\01\03:\08\02\02\98\03\01\0d\01\07\04\01\06\01\03\02\c6:\01\05\00\01\c3!\00\03\8d\01` \00\06i\02\00\04\01\n \02P\02\00\01\03\01\04\01\19\02\05\01\97\02\1a\12\0d\01&\08\19\0b.\030\01\02\04\02\02\'\01C\06\02\02\02\02\0c\01\08\01/\013\01\01\03\02\02\05\02\01\01*\02\08\01\ee\01\02\01\04\01\00\01\00\10\10\10\00\02\00\01\e2\01\95\05\00\03\01\02\05\04(\03\04\01\a5\02\00\04\00\02\99\0b\b0\016\0f8\031\04\02\02E\03$\05\01\08>\01\0c\024\t\n\04\02\01_\03\02\01\01\02\06\01\a0\01\03\08\15\029\02\01\01\01\01\16\01\0e\07\03\05\c3\08\02\03\01\01\17\01Q\01\02\06\01\01\02\01\01\02\01\02\eb\01\02\04\06\02\01\02\1b\02U\08\02\01\01\02j\01\01\01\02\06\01\01e\03\02\04\01\05\00\t\01\02\f5\01\n\02\01\01\04\01\90\04\02\02\04\01 \n(\06\02\04\08\01\t\06\02\03.\0d\01\02\00\07\01\06\01\01R\16\02\07\01\02\01\02z\06\03\01\01\02\01\07\01\01H\02\03\01\01\01\00\02\00\05;\07\00\01?\04Q\01\00\02\00\01\01\03\04\05\08\08\02\07\1e\04\94\03\007\042\08\01\0e\01\16\05\01\0f\00\07\01\11\02\07\01\02\01\05\00\07\00\04\00\07m\07\00`\80\f0\00\00\00\000(\10\00(\00\00\00K\00\00\00(\00\00\000(\10\00(\00\00\00W\00\00\00\16\00\00\00library/core/src/unicode/unicode_data.rsbegin <= end ( <= ) when slicing ` is out of bounds of `assertion failed: noborrownumber too small to fit in target typenumber too large to fit in target typeinvalid digit found in stringcannot parse integer from empty stringnumber would be zero for non-zero type\00|0\10\00\00\00\00\00p)\10\00\02\00\00\00: \00\00\c8)\10\00\1f\00\00\00\b0\01\00\00&\00\00\00\a8)\10\00 \00\00\000\00\00\00!\00\00\00\a8)\10\00 \00\00\001\00\00\00\12\00\00\00library/core/src/fmt/builders.rslibrary/core/src/str/pattern.rs\00\f8)\10\00 \00\00\00R\00\00\00\05\00\00\00library/core/src/slice/memchr.rs { , {\n \00\00\00\0c\00\00\00\04\00\00\00\"\00\00\00#\00\00\00$\00\00\00,\n\00\00 \00\00\00\04\00\00\00\04\00\00\00%\00\00\00&\00\00\00\'\00\00\00 }}\00\9c\1e\10\00\1b\00\00\00\fb\07\00\00\16\00\00\00\9c\1e\10\00\1b\00\00\00\f4\07\00\00\1e\00\00\00\80\16\00\00\00 \01\000`\01\010q\02\t\05\12\01d\01\1a\01\00\01\00\0b\1d\02\05\01/\01\00\01\00assertion failed: !d.is_zero()\00 \00\00\00\04\00\00\00\04\00\00\00(\00\00\00()ErrorLayoutErrprivate\00)\00\00\00\00\00\00\00\01\00\00\00*\00\00\00\04+\10\00t\00\00\00\n\01\00\009\00\00\00/Users/scottlott/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/alloc/layout.rs+\00\00\00\04\00\00\00\04\00\00\00,\00\00\00-\00\00\00.\00\00\00next_float: argument is NaN\00\bc+\10\00y\00\00\00_\01\00\00\10\00\00\00/Users/scottlott/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/num/dec2flt/rawfp.rsprev_float: argument is infinite\00\00\00\bc+\10\00y\00\00\00J\01\00\00\15\00\00\00prev_float: argument is NaN\00\bc+\10\00y\00\00\00K\01\00\00\10\00\00\00prev_float: argument is subnormal\00\00\00\bc+\10\00y\00\00\00L\01\00\00\16\00\00\00prev_float: argument is zero\bc+\10\00y\00\00\00M\01\00\00\11\00\00\004-\10\00\16\00\00\00T-\10\00\n\00\00\00\bc+\10\00y\00\00\00\fd\00\00\00\t\00\00\004-\10\00\16\00\00\00J-\10\00\n\00\00\00\bc+\10\00y\00\00\00\01\01\00\00\t\00\00\00fp_to_float: exponent too small too largeencode_subnormal: not actually subnormal\00\00\bc+\10\00y\00\00\00,\01\00\00\05\00\00\00inf\00\df-\10\00w\00\00\00&\01\00\00\19\00\00\00\df-\10\00w\00\00\00)\01\00\00\1b\00\00\00\df-\10\00w\00\00\00/\01\00\00\1f\00\00\00\df-\10\00w\00\00\004\01\00\00\1d\00\00\00NaN/Users/scottlott/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/num/dec2flt/mod.rscalled `Result::unwrap()` on an `Err` value\00\00\00/\00\00\00\0c\00\00\00\04\00\00\000\00\00\00\a4.\10\00\n\00\00\00K\01\00\00<\00\00\00src/lib.rsMissing Value in option!\00\00|0\10\00\00\00\00\00a Display implementation returned an error unexpectedly\001\00\00\00\00\00\00\00\01\00\00\002\00\00\00(/\10\00o\00\00\00\a1\08\00\00\0e\00\00\00/Users/scottlott/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/string.rsNP_Errormessage\00\003\00\00\00\04\00\00\00\04\00\00\004\00\00\00called `Option::unwrap()` on a `None` value\00\f4/\10\00\1c\00\00\00\da\01\00\00\1e\00\00\00library/std/src/panicking.rsnull pointer passed to rustrecursive use of an object detected which would lead to unsafe aliasing in rust\00\005\00\00\00\00\00\00\00\01\00\00\006\00\00\007\00\00\008\00\00\009\00\00\00\04\00\00\00\04\00\00\00:\00\00\00;\00\00\00<\00\00\00=\00\00\00\00\00\00\00\01\00\00\006\00\00\007\00\00\008\00\00\00")
(table $0 62 62 funcref)
(elem (i32.const 1) $core::fmt::num::imp::::fmt::hd561e3b5e34208ae $std::alloc::default_alloc_error_hook::hbb6d06b7bdeaa91f $no_proto_js::json_flex::json_decode::func::hc3d89694b7eb0879 $no_proto_js::json_flex::json_decode::func::he7763ccf0cc3e5fc $no_proto_js::json_flex::json_decode::func::h3280f70a1a0f1538 $no_proto_js::json_flex::json_decode::func::hd7d273aa7da5c14d $no_proto_js::json_flex::json_decode::func::h88230b15df8381ab $no_proto_js::json_flex::json_decode::func::h60fbe3d0f42ba110 $no_proto_js::json_flex::json_decode::func::hfc45a12610bd3f2a $no_proto_js::json_flex::json_decode::func::h2312e9945c16d145 $no_proto_js::json_flex::json_decode::func::h9aa28653016b53a2 $no_proto_js::json_flex::json_decode::func::h23b859e3f0f6fedb $no_proto_js::json_flex::json_decode::func::h3e3160e80178fa59 $no_proto_js::json_flex::json_decode::func::h4302235e5d1c4feb $no_proto_js::json_flex::json_decode::func::hc5144a2ad4f0f8dc $no_proto_js::json_flex::json_decode::func::h1e2c4ab4d322f861 $no_proto_js::json_flex::json_decode::func::hfb4c68a8763ba35b $no_proto_js::json_flex::json_decode::func::hf40a3c6eee627e96 $no_proto_js::json_flex::json_decode::func::h3cb0784ef6149c92 $no_proto_js::json_flex::json_decode::func::hd110ca9f6c6017a9 $no_proto_js::json_flex::json_decode::func::h1e6f4f90ba36485f $no_proto_js::json_flex::json_decode::func::h92b706b926ba37f8 $no_proto_js::json_flex::json_decode::func::h447251335fe0c8ef $core::fmt::num::imp::::fmt::hfae5fbf15f5bb234 $<&T\20as\20core::fmt::Display>::fmt::h283d139920eae5ae $<&T\20as\20core::fmt::Display>::fmt::h5b93fcafe437f0dd $<&T\20as\20core::fmt::Display>::fmt::h007e0d6beaeda957 $\20as\20core::fmt::Debug>::fmt::h63f8d8607f5d7b8e $::fmt::h6c19820accaada88 $core::ops::function::FnOnce::call_once::h390ea4377328b82d $<&T\20as\20core::fmt::Debug>::fmt::he81b86a5bbf53c3e $core::ptr::drop_in_place::h03a4ec563db69d56 $::type_id::h0362c57cdfadaca7 $::write_str::h321957978316f55b $core::fmt::Write::write_char::he8823860aba4c233 $core::fmt::Write::write_fmt::h5bfb9e814317fff8 $<&mut\20W\20as\20core::fmt::Write>::write_str::h8ac3aa69e0663a79 $<&mut\20W\20as\20core::fmt::Write>::write_char::hfba45291f71b64f9 $<&mut\20W\20as\20core::fmt::Write>::write_fmt::hff4bf8fb7188e977 $<&T\20as\20core::fmt::Debug>::fmt::h8d390f40912aa2a1 $core::ptr::drop_in_place::h8a6409b3020380bd $::fmt::h887d69ebef9cfcfe $core::ptr::drop_in_place::h769196292a827628 $<&mut\20W\20as\20core::fmt::Write>::write_str::hddecb258ce7d4915 $<&mut\20W\20as\20core::fmt::Write>::write_char::hd85f8d8b4ea0a1f3 $<&mut\20W\20as\20core::fmt::Write>::write_fmt::h2dbd7725edd452be $core::ptr::drop_in_place::hafd11a4a6d489b53 $::fmt::hd0a34fb96b167e69 $core::ptr::drop_in_place::h0e5faf2cf480468b $::fmt::hf256f065b358e9c8 $core::ptr::drop_in_place::h87d67fe74a414611 $<&T\20as\20core::fmt::Debug>::fmt::hb7f473183b6c77b2 $core::ptr::drop_in_place::h899bb420a8b98e2c $::new_cell_for_free_list::h0c04f2610c72f4be $::min_cell_size::ha2975c534d26c3c3 $::should_merge_adjacent_free_cells::h0582f607e09fe8cd $core::ptr::drop_in_place::hc0d245b0befc4ed6.365 $::new_cell_for_free_list::hd1aa804d330bbf31 $::min_cell_size::h86b8b509c7163b0e $::should_merge_adjacent_free_cells::h36ff1a26ee42cfe1 $core::ptr::drop_in_place::h899bb420a8b98e2c.364)
(global $global$0 (mut i32) (i32.const 1048576))
(export "memory" (memory $0))
(export "__wbg_np_factory_free" (func $__wbg_np_factory_free))
(export "np_factory_new" (func $np_factory_new))
(export "np_factory_new_compiled" (func $np_factory_new_compiled))
(export "np_factory_compile_schema" (func $np_factory_compile_schema))
(export "__wbindgen_malloc" (func $__wbindgen_malloc))
(export "__wbindgen_realloc" (func $__wbindgen_realloc))
(export "__wbindgen_export_2" (global $global$0))
(export "__wbindgen_free" (func $__wbindgen_free))
(func $no_proto_js::json_flex::json_decode::hfc4f88b81a751040 (; 1 ;) (param $0 i32) (param $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
(local $11 i32)
(local $12 i32)
(local $13 i32)
(local $14 i32)
(local $15 i32)
(local $16 i32)
(local $17 i32)
(local $18 i32)
(local $19 i32)
(local $20 i32)
(local $21 i32)
(local $22 i64)
(local $23 i64)
(global.set $global$0
(local.tee $2
(i32.sub
(global.get $global$0)
(i32.const 368)
)
)
)
(block $label$1
(block $label$2
(block $label$3
(block $label$4
(block $label$5
(block $label$6
(block $label$7
(block $label$8
(block $label$9
(br_if $label$9
(i32.eqz
(local.tee $3
(call $__rust_alloc
(i32.const 16)
(i32.const 8)
)
)
)
)
(i32.store
(local.get $3)
(i32.const 5)
)
(i64.store offset=4 align=4
(local.get $3)
(i64.load offset=288 align=4
(local.get $2)
)
)
(i32.store
(i32.add
(local.get $3)
(i32.const 12)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 8)
)
)
)
(local.set $4
(i32.const 0)
)
(i32.store offset=104
(local.get $2)
(i32.const 0)
)
(i64.store offset=96
(local.get $2)
(i64.const 4)
)
(i32.store offset=120
(local.get $2)
(i32.const 0)
)
(i64.store offset=112
(local.get $2)
(i64.const 4)
)
(i32.store offset=136
(local.get $2)
(i32.const 0)
)
(i64.store offset=128
(local.get $2)
(i64.const 8)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 160)
)
(i32.const 1060988)
(i32.const 0)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 176)
)
(i32.const 1060988)
(i32.const 0)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 192)
)
(i32.const 1060988)
(i32.const 0)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 208)
)
(i32.const 1060988)
(i32.const 0)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 224)
)
(i32.const 1060988)
(i32.const 0)
)
(i32.store offset=356
(local.get $2)
(i32.add
(local.tee $5
(i32.load
(local.get $1)
)
)
(i32.load offset=8
(local.get $1)
)
)
)
(i32.store offset=352
(local.get $2)
(local.get $5)
)
(block $label$10
(block $label$11
(block $label$12
(block $label$13
(br_if $label$13
(i32.eq
(local.tee $5
(call $::next::h4672746d73b58812
(i32.add
(local.get $2)
(i32.const 352)
)
)
)
(i32.const 1114112)
)
)
(call $core::alloc::layout::Layout::array::h666bf8f1b402ea69
(i32.add
(local.get $2)
(i32.const 88)
)
(i32.add
(i32.shr_u
(i32.add
(i32.sub
(local.tee $6
(i32.load offset=356
(local.get $2)
)
)
(local.tee $7
(i32.load offset=352
(local.get $2)
)
)
)
(i32.const 3)
)
(i32.const 2)
)
(i32.const 1)
)
)
(br_if $label$10
(i32.eqz
(local.tee $8
(i32.load offset=92
(local.get $2)
)
)
)
)
(br_if $label$10
(i32.le_s
(local.tee $9
(i32.load offset=88
(local.get $2)
)
)
(i32.const -1)
)
)
(call $::alloc::hbd6aa0d1925f7b82
(i32.add
(local.get $2)
(i32.const 80)
)
(local.get $9)
(local.get $8)
)
(br_if $label$11
(i32.eqz
(local.tee $10
(i32.load offset=80
(local.get $2)
)
)
)
)
(local.set $8
(i32.load offset=84
(local.get $2)
)
)
(i32.store
(local.get $10)
(local.get $5)
)
(i32.store offset=296
(local.get $2)
(i32.const 1)
)
(i32.store offset=288
(local.get $2)
(local.get $10)
)
(i32.store offset=292
(local.get $2)
(i32.shr_u
(local.get $8)
(i32.const 2)
)
)
(i32.store offset=276
(local.get $2)
(local.get $6)
)
(i32.store offset=272
(local.get $2)
(local.get $7)
)
(local.set $5
(i32.const 4)
)
(local.set $6
(i32.const 1)
)
(block $label$14
(loop $label$15
(br_if $label$14
(i32.eq
(local.tee $7
(call $::next::h4672746d73b58812
(i32.add
(local.get $2)
(i32.const 272)
)
)
)
(i32.const 1114112)
)
)
(block $label$16
(br_if $label$16
(i32.ne
(local.get $6)
(i32.load offset=292
(local.get $2)
)
)
)
(call $alloc::vec::Vec::reserve::h25a374cf9b3816f4
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.add
(i32.shr_u
(i32.add
(i32.sub
(i32.load offset=276
(local.get $2)
)
(i32.load offset=272
(local.get $2)
)
)
(i32.const 3)
)
(i32.const 2)
)
(i32.const 1)
)
)
(local.set $10
(i32.load offset=288
(local.get $2)
)
)
)
(i32.store
(i32.add
(local.get $10)
(local.get $5)
)
(local.get $7)
)
(i32.store offset=296
(local.get $2)
(local.tee $6
(i32.add
(local.get $6)
(i32.const 1)
)
)
)
(local.set $5
(i32.add
(local.get $5)
(i32.const 4)
)
)
(br $label$15)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 240)
)
(i32.const 8)
)
(local.tee $4
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 8)
)
)
)
)
(i64.store offset=240
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(br $label$12)
)
(i32.store offset=248
(local.get $2)
(i32.const 0)
)
(i64.store offset=240
(local.get $2)
(i64.const 4)
)
)
(local.set $11
(i32.add
(local.get $3)
(i32.const 4)
)
)
(local.set $12
(i32.or
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 4)
)
)
(local.set $5
(i32.const 32)
)
(local.set $14
(i32.add
(local.tee $13
(i32.or
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 1)
)
)
(i32.const 7)
)
)
(local.set $10
(i32.const 0)
)
(local.set $15
(i32.const 0)
)
(local.set $16
(i32.const 0)
)
(local.set $6
(i32.const 32)
)
(local.set $7
(i32.const 32)
)
(local.set $8
(i32.const 0)
)
(loop $label$17
(local.set $9
(local.get $6)
)
(local.set $17
(local.get $5)
)
(block $label$18
(block $label$19
(block $label$20
(block $label$21
(block $label$22
(block $label$23
(block $label$24
(block $label$25
(block $label$26
(block $label$27
(block $label$28
(block $label$29
(block $label$30
(block $label$31
(block $label$32
(block $label$33
(block $label$34
(block $label$35
(block $label$36
(block $label$37
(block $label$38
(block $label$39
(block $label$40
(block $label$41
(block $label$42
(block $label$43
(block $label$44
(block $label$45
(block $label$46
(block $label$47
(block $label$48
(block $label$49
(block $label$50
(block $label$51
(block $label$52
(block $label$53
(block $label$54
(block $label$55
(block $label$56
(block $label$57
(block $label$58
(block $label$59
(block $label$60
(block $label$61
(block $label$62
(block $label$63
(block $label$64
(block $label$65
(block $label$66
(block $label$67
(block $label$68
(block $label$69
(block $label$70
(block $label$71
(block $label$72
(block $label$73
(block $label$74
(block $label$75
(block $label$76
(block $label$77
(br_if $label$77
(i32.eqz
(i32.and
(local.get $16)
(i32.const 1)
)
)
)
(i32.store
(local.get $0)
(i32.const 0)
)
(i32.store offset=4
(local.get $0)
(local.get $3)
)
(call $core::ptr::drop_in_place::hdc334d1ef8c963f0
(i32.add
(local.get $2)
(i32.const 240)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 224)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 208)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 192)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 176)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 160)
)
)
(br_if $label$76
(i32.and
(local.get $15)
(i32.const 1)
)
)
(br $label$2)
)
(br_if $label$75
(i32.le_u
(local.tee $5
(i32.load offset=248
(local.get $2)
)
)
(local.get $8)
)
)
(local.set $5
(i32.load
(i32.add
(i32.load offset=240
(local.get $2)
)
(local.get $10)
)
)
)
(local.set $6
(i32.add
(local.get $2)
(i32.const 160)
)
)
(block $label$78
(block $label$79
(block $label$80
(block $label$81
(block $label$82
(block $label$83
(br_table $label$82 $label$78 $label$78 $label$78 $label$78 $label$79 $label$81 $label$78 $label$78 $label$79 $label$83
(local.tee $16
(i32.add
(local.get $7)
(i32.const -110)
)
)
)
)
(br_if $label$80
(i32.eq
(local.get $7)
(i32.const 48)
)
)
(br_if $label$78
(i32.ne
(local.get $7)
(i32.const 102)
)
)
(local.set $6
(i32.add
(local.get $2)
(i32.const 208)
)
)
(br $label$79)
)
(local.set $6
(i32.add
(local.get $2)
(i32.const 176)
)
)
(br $label$79)
)
(local.set $6
(i32.add
(local.get $2)
(i32.const 192)
)
)
(br $label$79)
)
(local.set $6
(i32.add
(local.get $2)
(i32.const 224)
)
)
)
(call $alloc::string::String::push::h91b2efd5d5771ece
(local.get $6)
(local.get $5)
)
)
(local.set $6
(local.get $9)
)
(block $label$84
(block $label$85
(block $label$86
(block $label$87
(block $label$88
(block $label$89
(block $label$90
(block $label$91
(block $label$92
(block $label$93
(block $label$94
(br_table $label$91 $label$18 $label$18 $label$18 $label$18 $label$90 $label$18 $label$18 $label$18 $label$18 $label$92 $label$88 $label$18 $label$18 $label$89 $label$89 $label$89 $label$89 $label$89 $label$89 $label$89 $label$89 $label$89 $label$89 $label$93 $label$94
(i32.add
(local.get $5)
(i32.const -34)
)
)
)
(local.set $6
(local.get $9)
)
(block $label$95
(block $label$96
(block $label$97
(block $label$98
(block $label$99
(br_table $label$98 $label$18 $label$97 $label$99
(i32.add
(local.get $5)
(i32.const -91)
)
)
)
(local.set $6
(local.get $9)
)
(block $label$100
(br_table $label$96 $label$18 $label$95 $label$100
(i32.add
(local.get $5)
(i32.const -123)
)
)
)
(br_if $label$86
(i32.eq
(local.get $5)
(i32.const 102)
)
)
(br_if $label$85
(i32.eq
(local.get $5)
(i32.const 110)
)
)
(br_if $label$87
(i32.eq
(local.get $5)
(i32.const 116)
)
)
(local.set $6
(local.get $9)
)
(br $label$18)
)
(local.set $6
(i32.const 91)
)
(block $label$101
(br_table $label$18 $label$101 $label$101 $label$101 $label$18 $label$101
(i32.add
(local.get $7)
(i32.const -115)
)
)
)
(call $alloc::vec::Vec::push::h9e2687f5393e789b
(i32.add
(local.get $2)
(i32.const 96)
)
(i32.const 97)
)
(call $alloc::vec::Vec::push::hfabd193d6c33320c
(i32.add
(local.get $2)
(i32.const 128)
)
(i64.const 0)
)
(block $label$102
(block $label$103
(block $label$104
(br_if $label$104
(i32.ne
(i32.load
(local.get $3)
)
(i32.const 5)
)
)
(call $core::ptr::drop_in_place::h26222354075eb354
(local.get $3)
)
(i64.store offset=8 align=4
(local.get $3)
(i64.const 0)
)
(i64.store
(local.get $3)
(i64.const 34359738372)
)
(br $label$103)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::clone::Clone>::clone::hb2ed7288767aec08
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 128)
)
)
(call $\20as\20core::clone::Clone>::clone::h123a33593991f8b5
(i32.add
(local.get $2)
(i32.const 320)
)
(i32.add
(local.get $2)
(i32.const 112)
)
)
(i32.store offset=336
(local.get $2)
(i32.const 0)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 8)
)
)
)
(i64.store offset=352
(local.get $2)
(i64.load offset=256
(local.get $2)
)
)
(call $no_proto_js::json_flex::recursive::h7e8e1c723ca95a7e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $3)
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 320)
)
(i64.const 0)
(i64.const 0)
(local.get $17)
(i32.const 3)
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.add
(local.get $2)
(i32.const 352)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=1
(local.get $13)
)
)
(i64.store offset=279 align=1
(local.get $2)
(i64.load align=1
(local.get $14)
)
)
(br_if $label$102
(i32.eq
(i32.load8_u offset=288
(local.get $2)
)
(i32.const 1)
)
)
)
(local.set $7
(i32.const 97)
)
(br $label$18)
)
(i64.store offset=4 align=1
(local.get $0)
(i64.load offset=275 align=1
(local.get $2)
)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store align=1
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load align=1
(i32.add
(local.get $2)
(i32.const 283)
)
)
)
(br $label$6)
)
(local.set $6
(i32.const 93)
)
(block $label$105
(block $label$106
(block $label$107
(block $label$108
(block $label$109
(block $label$110
(block $label$111
(br_table $label$106 $label$110 $label$110 $label$110 $label$110 $label$18 $label$109 $label$110 $label$110 $label$18 $label$111
(local.get $16)
)
)
(br_if $label$107
(i32.eq
(local.get $7)
(i32.const 48)
)
)
(br_if $label$105
(i32.eq
(local.get $7)
(i32.const 97)
)
)
(br_if $label$108
(i32.eq
(local.get $7)
(i32.const 102)
)
)
)
(call $no_proto_js::error::NP_Error::new::ha9935f425211c776
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 1048837)
(i32.const 42)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load
(i32.add
(local.get $2)
(i32.const 296)
)
)
)
(i64.store offset=4 align=4
(local.get $0)
(i64.load offset=288
(local.get $2)
)
)
(br $label$6)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(call $alloc::string::String::pop::ha45b97d794fc650f
(i32.add
(local.get $2)
(i32.const 192)
)
)
)
(i32.store
(local.tee $9
(i32.add
(i32.add
(local.get $2)
(i32.const 272)
)
(i32.const 8)
)
)
(i32.load
(local.tee $16
(i32.add
(local.get $12)
(i32.const 8)
)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$74
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $core::str::::trim::hc8020c4edbe7c218
(i32.add
(local.get $2)
(i32.const 8)
)
(i32.load offset=192
(local.get $2)
)
(i32.load offset=200
(local.get $2)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.load offset=8
(local.get $2)
)
(i32.load offset=12
(local.get $2)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 192)
)
)
(i32.store offset=200
(local.get $2)
(i32.load
(local.tee $18
(i32.add
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 8)
)
)
)
)
(i64.store offset=192
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(br_if $label$73
(call $>::ne::h2447bc43163523ff
(i32.add
(local.get $2)
(i32.const 192)
)
(i32.const 1048833)
(i32.const 4)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::clone::Clone>::clone::hb2ed7288767aec08
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 128)
)
)
(call $\20as\20core::clone::Clone>::clone::h123a33593991f8b5
(i32.add
(local.get $2)
(i32.const 320)
)
(i32.add
(local.get $2)
(i32.const 112)
)
)
(i32.store offset=336
(local.get $2)
(i32.const 0)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 8)
)
)
)
(i64.store offset=352
(local.get $2)
(i64.load offset=256
(local.get $2)
)
)
(call $no_proto_js::json_flex::recursive::h7e8e1c723ca95a7e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $3)
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 320)
)
(i64.const 0)
(i64.const 0)
(local.get $17)
(i32.const 4)
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.add
(local.get $2)
(i32.const 352)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=1
(local.get $13)
)
)
(i64.store offset=279 align=1
(local.get $2)
(i64.load align=1
(local.get $14)
)
)
(block $label$112
(block $label$113
(block $label$114
(br_if $label$114
(i32.eq
(i32.load8_u offset=288
(local.get $2)
)
(i32.const 1)
)
)
(block $label$115
(block $label$116
(br_if $label$116
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $7
(i32.const 1114112)
)
(br $label$115)
)
(i32.store offset=104
(local.get $2)
(local.tee $7
(i32.add
(local.get $7)
(i32.const -1)
)
)
)
(local.set $7
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $7)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $7)
)
(i32.store
(local.get $9)
(i32.load
(local.get $16)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$72
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(br_if $label$113
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $7
(i32.const 1114112)
)
(br $label$112)
)
(i64.store offset=4 align=1
(local.get $0)
(i64.load offset=275 align=1
(local.get $2)
)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store align=1
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load align=1
(i32.add
(local.get $2)
(i32.const 283)
)
)
)
(br $label$7)
)
(i32.store offset=104
(local.get $2)
(local.tee $7
(i32.add
(local.get $7)
(i32.const -1)
)
)
)
(local.set $7
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $7)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $7)
)
(i32.store
(local.get $9)
(i32.load
(local.get $16)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$71
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(local.set $7
(i32.load
(select
(i32.add
(i32.add
(i32.shl
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
(i32.const 2)
)
(i32.load offset=96
(local.get $2)
)
)
(i32.const -4)
)
(i32.const 1048804)
(local.get $7)
)
)
)
(block $label$117
(block $label$118
(br_if $label$118
(local.tee $17
(i32.load offset=136
(local.get $2)
)
)
)
(local.set $22
(i64.const 0)
)
(br $label$117)
)
(i32.store offset=136
(local.get $2)
(local.tee $17
(i32.add
(local.get $17)
(i32.const -1)
)
)
)
(local.set $23
(i64.load
(i32.add
(i32.load offset=128
(local.get $2)
)
(i32.shl
(local.get $17)
(i32.const 3)
)
)
)
)
(local.set $22
(i64.const 1)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h3e4014b423ae7142
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $22)
(local.get $23)
)
(i32.store
(local.get $9)
(i32.load
(local.get $16)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(block $label$119
(br_if $label$119
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 192)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 192)
)
(i32.const 8)
)
(i32.load
(local.get $18)
)
)
(i64.store offset=192
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(br $label$18)
)
(i64.store offset=4 align=4
(local.get $0)
(i64.load offset=272
(local.get $2)
)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load
(i32.add
(local.get $2)
(i32.const 280)
)
)
)
(br $label$7)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(call $alloc::string::String::pop::ha45b97d794fc650f
(i32.add
(local.get $2)
(i32.const 208)
)
)
)
(i32.store
(local.tee $9
(i32.add
(i32.add
(local.get $2)
(i32.const 272)
)
(i32.const 8)
)
)
(i32.load
(local.tee $16
(i32.add
(local.get $12)
(i32.const 8)
)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$70
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $core::str::::trim::hc8020c4edbe7c218
(i32.add
(local.get $2)
(i32.const 16)
)
(i32.load offset=208
(local.get $2)
)
(i32.load offset=216
(local.get $2)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.load offset=16
(local.get $2)
)
(i32.load offset=20
(local.get $2)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 208)
)
)
(i32.store offset=216
(local.get $2)
(i32.load
(local.tee $18
(i32.add
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 8)
)
)
)
)
(i64.store offset=208
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(br_if $label$69
(call $>::ne::h2447bc43163523ff
(i32.add
(local.get $2)
(i32.const 208)
)
(i32.const 1048828)
(i32.const 5)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::clone::Clone>::clone::hb2ed7288767aec08
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 128)
)
)
(call $\20as\20core::clone::Clone>::clone::h123a33593991f8b5
(i32.add
(local.get $2)
(i32.const 320)
)
(i32.add
(local.get $2)
(i32.const 112)
)
)
(i32.store offset=336
(local.get $2)
(i32.const 0)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 8)
)
)
)
(i64.store offset=352
(local.get $2)
(i64.load offset=256
(local.get $2)
)
)
(call $no_proto_js::json_flex::recursive::h7e8e1c723ca95a7e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $3)
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 320)
)
(i64.const 0)
(i64.const 0)
(local.get $17)
(i32.const 5)
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.add
(local.get $2)
(i32.const 352)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=1
(local.get $13)
)
)
(i64.store offset=279 align=1
(local.get $2)
(i64.load align=1
(local.get $14)
)
)
(block $label$120
(block $label$121
(block $label$122
(br_if $label$122
(i32.eq
(i32.load8_u offset=288
(local.get $2)
)
(i32.const 1)
)
)
(block $label$123
(block $label$124
(br_if $label$124
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $7
(i32.const 1114112)
)
(br $label$123)
)
(i32.store offset=104
(local.get $2)
(local.tee $7
(i32.add
(local.get $7)
(i32.const -1)
)
)
)
(local.set $7
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $7)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $7)
)
(i32.store
(local.get $9)
(i32.load
(local.get $16)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$68
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(br_if $label$121
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $7
(i32.const 1114112)
)
(br $label$120)
)
(i64.store offset=4 align=1
(local.get $0)
(i64.load offset=275 align=1
(local.get $2)
)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store align=1
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load align=1
(i32.add
(local.get $2)
(i32.const 283)
)
)
)
(br $label$7)
)
(i32.store offset=104
(local.get $2)
(local.tee $7
(i32.add
(local.get $7)
(i32.const -1)
)
)
)
(local.set $7
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $7)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $7)
)
(i32.store
(local.get $9)
(i32.load
(local.get $16)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$67
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(local.set $7
(i32.load
(select
(i32.add
(i32.add
(i32.shl
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
(i32.const 2)
)
(i32.load offset=96
(local.get $2)
)
)
(i32.const -4)
)
(i32.const 1048804)
(local.get $7)
)
)
)
(block $label$125
(block $label$126
(br_if $label$126
(local.tee $17
(i32.load offset=136
(local.get $2)
)
)
)
(local.set $22
(i64.const 0)
)
(br $label$125)
)
(i32.store offset=136
(local.get $2)
(local.tee $17
(i32.add
(local.get $17)
(i32.const -1)
)
)
)
(local.set $23
(i64.load
(i32.add
(i32.load offset=128
(local.get $2)
)
(i32.shl
(local.get $17)
(i32.const 3)
)
)
)
)
(local.set $22
(i64.const 1)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h3e4014b423ae7142
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $22)
(local.get $23)
)
(i32.store
(local.get $9)
(i32.load
(local.get $16)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(block $label$127
(br_if $label$127
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 208)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 208)
)
(i32.const 8)
)
(i32.load
(local.get $18)
)
)
(i64.store offset=208
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(br $label$18)
)
(i64.store offset=4 align=4
(local.get $0)
(i64.load offset=272
(local.get $2)
)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load
(i32.add
(local.get $2)
(i32.const 280)
)
)
)
(br $label$7)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(call $alloc::string::String::pop::ha45b97d794fc650f
(i32.add
(local.get $2)
(i32.const 224)
)
)
)
(i32.store
(local.tee $9
(i32.add
(i32.add
(local.get $2)
(i32.const 272)
)
(i32.const 8)
)
)
(i32.load
(local.tee $16
(i32.add
(local.get $12)
(i32.const 8)
)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$66
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $core::str::::trim::hc8020c4edbe7c218
(i32.add
(local.get $2)
(i32.const 24)
)
(i32.load offset=224
(local.get $2)
)
(i32.load offset=232
(local.get $2)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.load offset=24
(local.get $2)
)
(i32.load offset=28
(local.get $2)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 224)
)
)
(i32.store offset=232
(local.get $2)
(i32.load
(local.tee $18
(i32.add
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 8)
)
)
)
)
(i64.store offset=224
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(br_if $label$65
(call $>::ne::h2447bc43163523ff
(i32.add
(local.get $2)
(i32.const 224)
)
(i32.const 1048808)
(i32.const 4)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::clone::Clone>::clone::hb2ed7288767aec08
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 128)
)
)
(call $\20as\20core::clone::Clone>::clone::h123a33593991f8b5
(i32.add
(local.get $2)
(i32.const 320)
)
(i32.add
(local.get $2)
(i32.const 112)
)
)
(i32.store offset=336
(local.get $2)
(i32.const 0)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 8)
)
)
)
(i64.store offset=352
(local.get $2)
(i64.load offset=256
(local.get $2)
)
)
(call $no_proto_js::json_flex::recursive::h7e8e1c723ca95a7e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $3)
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 320)
)
(i64.const 0)
(i64.const 0)
(local.get $17)
(i32.const 6)
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.add
(local.get $2)
(i32.const 352)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=1
(local.get $13)
)
)
(i64.store offset=279 align=1
(local.get $2)
(i64.load align=1
(local.get $14)
)
)
(block $label$128
(block $label$129
(block $label$130
(br_if $label$130
(i32.eq
(i32.load8_u offset=288
(local.get $2)
)
(i32.const 1)
)
)
(block $label$131
(block $label$132
(br_if $label$132
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $7
(i32.const 1114112)
)
(br $label$131)
)
(i32.store offset=104
(local.get $2)
(local.tee $7
(i32.add
(local.get $7)
(i32.const -1)
)
)
)
(local.set $7
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $7)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $7)
)
(i32.store
(local.get $9)
(i32.load
(local.get $16)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$64
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(br_if $label$129
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $7
(i32.const 1114112)
)
(br $label$128)
)
(i64.store offset=4 align=1
(local.get $0)
(i64.load offset=275 align=1
(local.get $2)
)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store align=1
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load align=1
(i32.add
(local.get $2)
(i32.const 283)
)
)
)
(br $label$7)
)
(i32.store offset=104
(local.get $2)
(local.tee $7
(i32.add
(local.get $7)
(i32.const -1)
)
)
)
(local.set $7
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $7)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $7)
)
(i32.store
(local.get $9)
(i32.load
(local.get $16)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$63
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(local.set $7
(i32.load
(select
(i32.add
(i32.add
(i32.shl
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
(i32.const 2)
)
(i32.load offset=96
(local.get $2)
)
)
(i32.const -4)
)
(i32.const 1048804)
(local.get $7)
)
)
)
(block $label$133
(block $label$134
(br_if $label$134
(local.tee $17
(i32.load offset=136
(local.get $2)
)
)
)
(local.set $22
(i64.const 0)
)
(br $label$133)
)
(i32.store offset=136
(local.get $2)
(local.tee $17
(i32.add
(local.get $17)
(i32.const -1)
)
)
)
(local.set $23
(i64.load
(i32.add
(i32.load offset=128
(local.get $2)
)
(i32.shl
(local.get $17)
(i32.const 3)
)
)
)
)
(local.set $22
(i64.const 1)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h3e4014b423ae7142
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $22)
(local.get $23)
)
(i32.store
(local.get $9)
(i32.load
(local.get $16)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(block $label$135
(br_if $label$135
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 224)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 224)
)
(i32.const 8)
)
(i32.load
(local.get $18)
)
)
(i64.store offset=224
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(br $label$18)
)
(i64.store offset=4 align=4
(local.get $0)
(i64.load offset=272
(local.get $2)
)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load
(i32.add
(local.get $2)
(i32.const 280)
)
)
)
(br $label$7)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::clone::Clone>::clone::hb2ed7288767aec08
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 128)
)
)
(call $\20as\20core::clone::Clone>::clone::h123a33593991f8b5
(i32.add
(local.get $2)
(i32.const 320)
)
(i32.add
(local.get $2)
(i32.const 112)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.const 8)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 176)
)
(i32.const 8)
)
)
)
(i64.store offset=336
(local.get $2)
(i64.load offset=176
(local.get $2)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 8)
)
)
)
(i64.store offset=352
(local.get $2)
(i64.load offset=256
(local.get $2)
)
)
(call $no_proto_js::json_flex::recursive::h7e8e1c723ca95a7e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $3)
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 320)
)
(i64.const 0)
(i64.const 0)
(local.get $17)
(i32.const 7)
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.add
(local.get $2)
(i32.const 352)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=1
(local.get $13)
)
)
(i64.store offset=279 align=1
(local.get $2)
(i64.load align=1
(local.get $14)
)
)
(block $label$136
(block $label$137
(block $label$138
(br_if $label$138
(i32.eq
(i32.load8_u offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 176)
)
(i32.const 1060988)
(i32.const 0)
)
(block $label$139
(block $label$140
(br_if $label$140
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $7
(i32.const 1114112)
)
(br $label$139)
)
(i32.store offset=104
(local.get $2)
(local.tee $7
(i32.add
(local.get $7)
(i32.const -1)
)
)
)
(local.set $7
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $7)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $7)
)
(i32.store
(local.tee $9
(i32.add
(i32.add
(local.get $2)
(i32.const 272)
)
(i32.const 8)
)
)
(i32.load
(local.tee $16
(i32.add
(local.get $12)
(i32.const 8)
)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$62
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(br_if $label$137
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $7
(i32.const 1114112)
)
(br $label$136)
)
(i64.store offset=4 align=1
(local.get $0)
(i64.load offset=275 align=1
(local.get $2)
)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store align=1
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load align=1
(i32.add
(local.get $2)
(i32.const 283)
)
)
)
(br $label$8)
)
(i32.store offset=104
(local.get $2)
(local.tee $7
(i32.add
(local.get $7)
(i32.const -1)
)
)
)
(local.set $7
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $7)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $7)
)
(i32.store
(local.get $9)
(i32.load
(local.get $16)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$61
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(local.set $7
(i32.load
(select
(i32.add
(i32.add
(i32.shl
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
(i32.const 2)
)
(i32.load offset=96
(local.get $2)
)
)
(i32.const -4)
)
(i32.const 1048804)
(local.get $7)
)
)
)
(block $label$141
(block $label$142
(br_if $label$142
(local.tee $17
(i32.load offset=136
(local.get $2)
)
)
)
(local.set $22
(i64.const 0)
)
(br $label$141)
)
(i32.store offset=136
(local.get $2)
(local.tee $17
(i32.add
(local.get $17)
(i32.const -1)
)
)
)
(local.set $23
(i64.load
(i32.add
(i32.load offset=128
(local.get $2)
)
(i32.shl
(local.get $17)
(i32.const 3)
)
)
)
)
(local.set $22
(i64.const 1)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h3e4014b423ae7142
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $22)
(local.get $23)
)
(i32.store
(local.get $9)
(i32.load
(local.get $16)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$18
(i32.ne
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(i64.store offset=4 align=4
(local.get $0)
(i64.load offset=272
(local.get $2)
)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load
(i32.add
(local.get $2)
(i32.const 280)
)
)
)
(br $label$6)
)
(block $label$143
(br_if $label$143
(i32.ne
(local.get $9)
(i32.const 44)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::clone::Clone>::clone::hb2ed7288767aec08
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 128)
)
)
(call $\20as\20core::clone::Clone>::clone::h123a33593991f8b5
(i32.add
(local.get $2)
(i32.const 320)
)
(i32.add
(local.get $2)
(i32.const 112)
)
)
(i32.store offset=336
(local.get $2)
(i32.const 0)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 8)
)
)
)
(i64.store offset=352
(local.get $2)
(i64.load offset=256
(local.get $2)
)
)
(call $no_proto_js::json_flex::recursive::h7e8e1c723ca95a7e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $3)
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 320)
)
(i64.const 0)
(i64.const 0)
(local.get $17)
(i32.const 8)
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.add
(local.get $2)
(i32.const 352)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=1
(local.get $13)
)
)
(i64.store offset=279 align=1
(local.get $2)
(i64.load align=1
(local.get $14)
)
)
(br_if $label$143
(i32.ne
(i32.load8_u offset=288
(local.get $2)
)
(i32.const 1)
)
)
(i64.store offset=4 align=1
(local.get $0)
(i64.load offset=275 align=1
(local.get $2)
)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store align=1
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load align=1
(i32.add
(local.get $2)
(i32.const 283)
)
)
)
(br $label$6)
)
(block $label$144
(block $label$145
(br_if $label$145
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $7
(i32.const 1114112)
)
(br $label$144)
)
(i32.store offset=104
(local.get $2)
(local.tee $7
(i32.add
(local.get $7)
(i32.const -1)
)
)
)
(local.set $7
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $7)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $7)
)
(i32.store
(local.tee $9
(i32.add
(i32.add
(local.get $2)
(i32.const 272)
)
(i32.const 8)
)
)
(i32.load
(local.tee $16
(i32.add
(local.get $12)
(i32.const 8)
)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$60
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(local.set $7
(i32.load
(select
(i32.add
(i32.add
(i32.shl
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
(i32.const 2)
)
(i32.load offset=96
(local.get $2)
)
)
(i32.const -4)
)
(i32.const 1048804)
(local.get $7)
)
)
)
(block $label$146
(block $label$147
(br_if $label$147
(local.tee $17
(i32.load offset=136
(local.get $2)
)
)
)
(local.set $22
(i64.const 0)
)
(br $label$146)
)
(i32.store offset=136
(local.get $2)
(local.tee $17
(i32.add
(local.get $17)
(i32.const -1)
)
)
)
(local.set $23
(i64.load
(i32.add
(i32.load offset=128
(local.get $2)
)
(i32.shl
(local.get $17)
(i32.const 3)
)
)
)
)
(local.set $22
(i64.const 1)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h3e4014b423ae7142
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $22)
(local.get $23)
)
(i32.store
(local.get $9)
(i32.load
(local.get $16)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$18
(i32.ne
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(i64.store offset=4 align=4
(local.get $0)
(i64.load offset=272
(local.get $2)
)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load
(i32.add
(local.get $2)
(i32.const 280)
)
)
)
(br $label$6)
)
(local.set $6
(i32.const 123)
)
(block $label$148
(block $label$149
(br_table $label$18 $label$148 $label$148 $label$149 $label$18 $label$148
(i32.add
(local.get $7)
(i32.const -115)
)
)
)
(call $alloc::vec::Vec::push::h9e2687f5393e789b
(i32.add
(local.get $2)
(i32.const 96)
)
(i32.const 100)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::clone::Clone>::clone::hb2ed7288767aec08
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 128)
)
)
(call $\20as\20core::clone::Clone>::clone::h123a33593991f8b5
(i32.add
(local.get $2)
(i32.const 320)
)
(i32.add
(local.get $2)
(i32.const 112)
)
)
(i32.store offset=336
(local.get $2)
(i32.const 0)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 8)
)
)
)
(i64.store offset=352
(local.get $2)
(i64.load offset=256
(local.get $2)
)
)
(call $no_proto_js::json_flex::recursive::h7e8e1c723ca95a7e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $3)
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 320)
)
(i64.const 0)
(i64.const 0)
(local.get $17)
(i32.const 9)
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.add
(local.get $2)
(i32.const 352)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=1
(local.get $13)
)
)
(i64.store offset=279 align=1
(local.get $2)
(i64.load align=1
(local.get $14)
)
)
(br_if $label$19
(i32.ne
(i32.load8_u offset=288
(local.get $2)
)
(i32.const 1)
)
)
(i64.store offset=4 align=1
(local.get $0)
(i64.load offset=275 align=1
(local.get $2)
)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store align=1
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load align=1
(i32.add
(local.get $2)
(i32.const 283)
)
)
)
(br $label$6)
)
(call $alloc::vec::Vec::push::h9e2687f5393e789b
(i32.add
(local.get $2)
(i32.const 96)
)
(i32.const 100)
)
(br_if $label$20
(i32.eq
(i32.load
(local.get $3)
)
(i32.const 5)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::clone::Clone>::clone::hb2ed7288767aec08
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 128)
)
)
(call $\20as\20core::clone::Clone>::clone::h123a33593991f8b5
(i32.add
(local.get $2)
(i32.const 320)
)
(i32.add
(local.get $2)
(i32.const 112)
)
)
(i32.store offset=336
(local.get $2)
(i32.const 0)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 8)
)
)
)
(i64.store offset=352
(local.get $2)
(i64.load offset=256
(local.get $2)
)
)
(call $no_proto_js::json_flex::recursive::h7e8e1c723ca95a7e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $3)
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 320)
)
(i64.const 0)
(i64.const 0)
(local.get $17)
(i32.const 10)
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.add
(local.get $2)
(i32.const 352)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=1
(local.get $13)
)
)
(i64.store offset=279 align=1
(local.get $2)
(i64.load align=1
(local.get $14)
)
)
(br_if $label$19
(i32.ne
(i32.load8_u offset=288
(local.get $2)
)
(i32.const 1)
)
)
(i64.store offset=4 align=1
(local.get $0)
(i64.load offset=275 align=1
(local.get $2)
)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store align=1
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load align=1
(i32.add
(local.get $2)
(i32.const 283)
)
)
)
(br $label$6)
)
(local.set $6
(i32.const 125)
)
(block $label$150
(block $label$151
(block $label$152
(block $label$153
(block $label$154
(block $label$155
(block $label$156
(block $label$157
(block $label$158
(br_table $label$153 $label$157 $label$157 $label$157 $label$157 $label$18 $label$156 $label$157 $label$152 $label$18 $label$158
(local.get $16)
)
)
(br_if $label$154
(i32.eq
(local.get $7)
(i32.const 48)
)
)
(br_if $label$155
(i32.eq
(local.get $7)
(i32.const 102)
)
)
)
(block $label$159
(block $label$160
(br_if $label$160
(i32.eqz
(local.tee $7
(i32.load offset=120
(local.get $2)
)
)
)
)
(i32.store offset=120
(local.get $2)
(local.tee $7
(i32.add
(local.get $7)
(i32.const -1)
)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 272)
)
(i32.const 8)
)
(i32.load
(i32.add
(local.tee $7
(i32.add
(i32.load offset=112
(local.get $2)
)
(i32.mul
(local.get $7)
(i32.const 12)
)
)
)
(i32.const 8)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $7)
)
)
(br $label$159)
)
(i32.store offset=272
(local.get $2)
(i32.const 0)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2a35cd0bfa5f989e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.add
(local.get $2)
(i32.const 272)
)
)
(i32.store
(local.tee $7
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
)
(i32.load
(local.tee $9
(i32.add
(local.get $12)
(i32.const 8)
)
)
)
)
(i64.store offset=352
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$39
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.const 8)
)
(i32.load
(local.get $7)
)
)
(i64.store offset=336
(local.get $2)
(i64.load offset=352
(local.get $2)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 336)
)
)
(br_if $label$151
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $7
(i32.const 1114112)
)
(br $label$150)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(call $alloc::string::String::pop::ha45b97d794fc650f
(i32.add
(local.get $2)
(i32.const 192)
)
)
)
(i32.store
(local.tee $9
(i32.add
(i32.add
(local.get $2)
(i32.const 272)
)
(i32.const 8)
)
)
(i32.load
(local.tee $7
(i32.add
(local.get $12)
(i32.const 8)
)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$59
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $core::str::::trim::hc8020c4edbe7c218
(i32.add
(local.get $2)
(i32.const 32)
)
(i32.load offset=192
(local.get $2)
)
(i32.load offset=200
(local.get $2)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.load offset=32
(local.get $2)
)
(i32.load offset=36
(local.get $2)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 192)
)
)
(i32.store offset=200
(local.get $2)
(i32.load
(local.tee $18
(i32.add
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 8)
)
)
)
)
(i64.store offset=192
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(br_if $label$58
(call $>::ne::h2447bc43163523ff
(i32.add
(local.get $2)
(i32.const 192)
)
(i32.const 1048833)
(i32.const 4)
)
)
(block $label$161
(block $label$162
(br_if $label$162
(local.tee $16
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $16
(i32.const 1114112)
)
(br $label$161)
)
(i32.store offset=104
(local.get $2)
(local.tee $16
(i32.add
(local.get $16)
(i32.const -1)
)
)
)
(local.set $16
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $16)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $16)
)
(i32.store
(local.get $9)
(i32.load
(local.get $7)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$57
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(block $label$163
(br_if $label$163
(i32.ne
(i32.load
(select
(local.tee $20
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.tee $19
(i32.add
(local.tee $16
(i32.load offset=104
(local.get $2)
)
)
(i32.const -1)
)
)
(i32.const 2)
)
)
)
(i32.const 1048804)
(local.get $16)
)
)
(i32.const 118)
)
)
(block $label$164
(block $label$165
(br_if $label$165
(local.get $16)
)
(local.set $16
(i32.const 1114112)
)
(br $label$164)
)
(i32.store offset=104
(local.get $2)
(local.get $19)
)
(local.set $16
(i32.load
(local.get $20)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $16)
)
(i32.store
(local.get $9)
(i32.load
(local.get $7)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$56
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::clone::Clone>::clone::hb2ed7288767aec08
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 128)
)
)
(call $\20as\20core::clone::Clone>::clone::h123a33593991f8b5
(i32.add
(local.get $2)
(i32.const 320)
)
(i32.add
(local.get $2)
(i32.const 112)
)
)
(i32.store offset=336
(local.get $2)
(i32.const 0)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 8)
)
)
)
(i64.store offset=352
(local.get $2)
(i64.load offset=256
(local.get $2)
)
)
(call $no_proto_js::json_flex::recursive::h7e8e1c723ca95a7e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $3)
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 320)
)
(i64.const 0)
(i64.const 0)
(local.get $17)
(i32.const 11)
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.add
(local.get $2)
(i32.const 352)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=1
(local.get $13)
)
)
(i64.store offset=279 align=1
(local.get $2)
(i64.load align=1
(local.get $14)
)
)
(br_if $label$163
(i32.ne
(i32.load8_u offset=288
(local.get $2)
)
(i32.const 1)
)
)
(i64.store offset=4 align=1
(local.get $0)
(i64.load offset=275 align=1
(local.get $2)
)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store align=1
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load align=1
(i32.add
(local.get $2)
(i32.const 283)
)
)
)
(br $label$6)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 192)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 192)
)
(i32.const 8)
)
(i32.load
(local.get $18)
)
)
(i64.store offset=192
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(block $label$166
(block $label$167
(br_if $label$167
(i32.eqz
(local.tee $16
(i32.load offset=120
(local.get $2)
)
)
)
)
(i32.store offset=120
(local.get $2)
(local.tee $16
(i32.add
(local.get $16)
(i32.const -1)
)
)
)
(i32.store
(local.get $9)
(i32.load
(i32.add
(local.tee $16
(i32.add
(i32.load offset=112
(local.get $2)
)
(i32.mul
(local.get $16)
(i32.const 12)
)
)
)
(i32.const 8)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $16)
)
)
(br $label$166)
)
(i32.store offset=272
(local.get $2)
(i32.const 0)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2a35cd0bfa5f989e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.add
(local.get $2)
(i32.const 272)
)
)
(i32.store
(local.tee $16
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
)
(i32.load
(local.get $7)
)
)
(i64.store offset=352
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$55
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.const 8)
)
(i32.load
(local.get $16)
)
)
(i64.store offset=336
(local.get $2)
(i64.load offset=352
(local.get $2)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 336)
)
)
(block $label$168
(block $label$169
(br_if $label$169
(local.tee $16
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $16
(i32.const 1114112)
)
(br $label$168)
)
(i32.store offset=104
(local.get $2)
(local.tee $16
(i32.add
(local.get $16)
(i32.const -1)
)
)
)
(local.set $16
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $16)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $16)
)
(i32.store
(local.get $9)
(i32.load
(local.get $7)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(block $label$170
(br_if $label$170
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(local.set $7
(i32.load
(select
(i32.add
(i32.add
(i32.shl
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
(i32.const 2)
)
(i32.load offset=96
(local.get $2)
)
)
(i32.const -4)
)
(i32.const 1048804)
(local.get $7)
)
)
)
(br $label$18)
)
(i64.store offset=4 align=4
(local.get $0)
(i64.load offset=272
(local.get $2)
)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load
(i32.add
(local.get $2)
(i32.const 280)
)
)
)
(br $label$6)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(call $alloc::string::String::pop::ha45b97d794fc650f
(i32.add
(local.get $2)
(i32.const 208)
)
)
)
(i32.store
(local.tee $9
(i32.add
(i32.add
(local.get $2)
(i32.const 272)
)
(i32.const 8)
)
)
(i32.load
(local.tee $7
(i32.add
(local.get $12)
(i32.const 8)
)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$54
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $core::str::::trim::hc8020c4edbe7c218
(i32.add
(local.get $2)
(i32.const 40)
)
(i32.load offset=208
(local.get $2)
)
(i32.load offset=216
(local.get $2)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.load offset=40
(local.get $2)
)
(i32.load offset=44
(local.get $2)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 208)
)
)
(i32.store offset=216
(local.get $2)
(i32.load
(local.tee $18
(i32.add
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 8)
)
)
)
)
(i64.store offset=208
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(br_if $label$53
(call $>::ne::h2447bc43163523ff
(i32.add
(local.get $2)
(i32.const 208)
)
(i32.const 1048828)
(i32.const 5)
)
)
(block $label$171
(block $label$172
(br_if $label$172
(local.tee $16
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $16
(i32.const 1114112)
)
(br $label$171)
)
(i32.store offset=104
(local.get $2)
(local.tee $16
(i32.add
(local.get $16)
(i32.const -1)
)
)
)
(local.set $16
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $16)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $16)
)
(i32.store
(local.get $9)
(i32.load
(local.get $7)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$52
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(block $label$173
(br_if $label$173
(i32.ne
(i32.load
(select
(local.tee $20
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.tee $19
(i32.add
(local.tee $16
(i32.load offset=104
(local.get $2)
)
)
(i32.const -1)
)
)
(i32.const 2)
)
)
)
(i32.const 1048804)
(local.get $16)
)
)
(i32.const 118)
)
)
(block $label$174
(block $label$175
(br_if $label$175
(local.get $16)
)
(local.set $16
(i32.const 1114112)
)
(br $label$174)
)
(i32.store offset=104
(local.get $2)
(local.get $19)
)
(local.set $16
(i32.load
(local.get $20)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $16)
)
(i32.store
(local.get $9)
(i32.load
(local.get $7)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$51
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::clone::Clone>::clone::hb2ed7288767aec08
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 128)
)
)
(call $\20as\20core::clone::Clone>::clone::h123a33593991f8b5
(i32.add
(local.get $2)
(i32.const 320)
)
(i32.add
(local.get $2)
(i32.const 112)
)
)
(i32.store offset=336
(local.get $2)
(i32.const 0)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 8)
)
)
)
(i64.store offset=352
(local.get $2)
(i64.load offset=256
(local.get $2)
)
)
(call $no_proto_js::json_flex::recursive::h7e8e1c723ca95a7e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $3)
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 320)
)
(i64.const 0)
(i64.const 0)
(local.get $17)
(i32.const 12)
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.add
(local.get $2)
(i32.const 352)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=1
(local.get $13)
)
)
(i64.store offset=279 align=1
(local.get $2)
(i64.load align=1
(local.get $14)
)
)
(br_if $label$173
(i32.ne
(i32.load8_u offset=288
(local.get $2)
)
(i32.const 1)
)
)
(i64.store offset=4 align=1
(local.get $0)
(i64.load offset=275 align=1
(local.get $2)
)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store align=1
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load align=1
(i32.add
(local.get $2)
(i32.const 283)
)
)
)
(br $label$6)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 208)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 208)
)
(i32.const 8)
)
(i32.load
(local.get $18)
)
)
(i64.store offset=208
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(block $label$176
(block $label$177
(br_if $label$177
(i32.eqz
(local.tee $16
(i32.load offset=120
(local.get $2)
)
)
)
)
(i32.store offset=120
(local.get $2)
(local.tee $16
(i32.add
(local.get $16)
(i32.const -1)
)
)
)
(i32.store
(local.get $9)
(i32.load
(i32.add
(local.tee $16
(i32.add
(i32.load offset=112
(local.get $2)
)
(i32.mul
(local.get $16)
(i32.const 12)
)
)
)
(i32.const 8)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $16)
)
)
(br $label$176)
)
(i32.store offset=272
(local.get $2)
(i32.const 0)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2a35cd0bfa5f989e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.add
(local.get $2)
(i32.const 272)
)
)
(i32.store
(local.tee $16
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
)
(i32.load
(local.get $7)
)
)
(i64.store offset=352
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$50
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.const 8)
)
(i32.load
(local.get $16)
)
)
(i64.store offset=336
(local.get $2)
(i64.load offset=352
(local.get $2)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 336)
)
)
(block $label$178
(block $label$179
(br_if $label$179
(local.tee $16
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $16
(i32.const 1114112)
)
(br $label$178)
)
(i32.store offset=104
(local.get $2)
(local.tee $16
(i32.add
(local.get $16)
(i32.const -1)
)
)
)
(local.set $16
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $16)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $16)
)
(i32.store
(local.get $9)
(i32.load
(local.get $7)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(block $label$180
(br_if $label$180
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(local.set $7
(i32.load
(select
(i32.add
(i32.add
(i32.shl
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
(i32.const 2)
)
(i32.load offset=96
(local.get $2)
)
)
(i32.const -4)
)
(i32.const 1048804)
(local.get $7)
)
)
)
(br $label$18)
)
(i64.store offset=4 align=4
(local.get $0)
(i64.load offset=272
(local.get $2)
)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load
(i32.add
(local.get $2)
(i32.const 280)
)
)
)
(br $label$6)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(call $alloc::string::String::pop::ha45b97d794fc650f
(i32.add
(local.get $2)
(i32.const 224)
)
)
)
(i32.store
(local.tee $9
(i32.add
(i32.add
(local.get $2)
(i32.const 272)
)
(i32.const 8)
)
)
(i32.load
(local.tee $7
(i32.add
(local.get $12)
(i32.const 8)
)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$49
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $core::str::::trim::hc8020c4edbe7c218
(i32.add
(local.get $2)
(i32.const 48)
)
(i32.load offset=224
(local.get $2)
)
(i32.load offset=232
(local.get $2)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.load offset=48
(local.get $2)
)
(i32.load offset=52
(local.get $2)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 224)
)
)
(i32.store offset=232
(local.get $2)
(i32.load
(local.tee $18
(i32.add
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 8)
)
)
)
)
(i64.store offset=224
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(br_if $label$48
(call $>::ne::h2447bc43163523ff
(i32.add
(local.get $2)
(i32.const 224)
)
(i32.const 1048808)
(i32.const 4)
)
)
(block $label$181
(block $label$182
(br_if $label$182
(local.tee $16
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $16
(i32.const 1114112)
)
(br $label$181)
)
(i32.store offset=104
(local.get $2)
(local.tee $16
(i32.add
(local.get $16)
(i32.const -1)
)
)
)
(local.set $16
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $16)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $16)
)
(i32.store
(local.get $9)
(i32.load
(local.get $7)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$47
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(block $label$183
(br_if $label$183
(i32.ne
(i32.load
(select
(local.tee $20
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.tee $19
(i32.add
(local.tee $16
(i32.load offset=104
(local.get $2)
)
)
(i32.const -1)
)
)
(i32.const 2)
)
)
)
(i32.const 1048804)
(local.get $16)
)
)
(i32.const 118)
)
)
(block $label$184
(block $label$185
(br_if $label$185
(local.get $16)
)
(local.set $16
(i32.const 1114112)
)
(br $label$184)
)
(i32.store offset=104
(local.get $2)
(local.get $19)
)
(local.set $16
(i32.load
(local.get $20)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $16)
)
(i32.store
(local.get $9)
(i32.load
(local.get $7)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$46
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::clone::Clone>::clone::hb2ed7288767aec08
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 128)
)
)
(call $\20as\20core::clone::Clone>::clone::h123a33593991f8b5
(i32.add
(local.get $2)
(i32.const 320)
)
(i32.add
(local.get $2)
(i32.const 112)
)
)
(i32.store offset=336
(local.get $2)
(i32.const 0)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
(i32.load
(i32.add
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 8)
)
)
)
(i64.store offset=352
(local.get $2)
(i64.load offset=256
(local.get $2)
)
)
(call $no_proto_js::json_flex::recursive::h7e8e1c723ca95a7e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $3)
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 320)
)
(i64.const 0)
(i64.const 0)
(local.get $17)
(i32.const 13)
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.add
(local.get $2)
(i32.const 352)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=1
(local.get $13)
)
)
(i64.store offset=279 align=1
(local.get $2)
(i64.load align=1
(local.get $14)
)
)
(br_if $label$183
(i32.ne
(i32.load8_u offset=288
(local.get $2)
)
(i32.const 1)
)
)
(i64.store offset=4 align=1
(local.get $0)
(i64.load offset=275 align=1
(local.get $2)
)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store align=1
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load align=1
(i32.add
(local.get $2)
(i32.const 283)
)
)
)
(br $label$6)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 224)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 224)
)
(i32.const 8)
)
(i32.load
(local.get $18)
)
)
(i64.store offset=224
(local.get $2)
(i64.load offset=288
(local.get $2)
)
)
(block $label$186
(block $label$187
(br_if $label$187
(i32.eqz
(local.tee $16
(i32.load offset=120
(local.get $2)
)
)
)
)
(i32.store offset=120
(local.get $2)
(local.tee $16
(i32.add
(local.get $16)
(i32.const -1)
)
)
)
(i32.store
(local.get $9)
(i32.load
(i32.add
(local.tee $16
(i32.add
(i32.load offset=112
(local.get $2)
)
(i32.mul
(local.get $16)
(i32.const 12)
)
)
)
(i32.const 8)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $16)
)
)
(br $label$186)
)
(i32.store offset=272
(local.get $2)
(i32.const 0)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2a35cd0bfa5f989e
(i32.add
(local.get $2)
(i32.const 288)
)
(i32.add
(local.get $2)
(i32.const 272)
)
)
(i32.store
(local.tee $16
(i32.add
(i32.add
(local.get $2)
(i32.const 352)
)
(i32.const 8)
)
)
(i32.load
(local.get $7)
)
)
(i64.store offset=352
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$45
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(i32.store
(i32.add
(i32.add
(local.get $2)
(i32.const 336)
)
(i32.const 8)
)
(i32.load
(local.get $16)
)
)
(i64.store offset=336
(local.get $2)
(i64.load offset=352
(local.get $2)
)
)
(call $\20as\20core::ops::drop::Drop>::drop::hdfa1b83a701659f3
(i32.add
(local.get $2)
(i32.const 336)
)
)
(block $label$188
(block $label$189
(br_if $label$189
(local.tee $16
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $16
(i32.const 1114112)
)
(br $label$188)
)
(i32.store offset=104
(local.get $2)
(local.tee $16
(i32.add
(local.get $16)
(i32.const -1)
)
)
)
(local.set $16
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $16)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $16)
)
(i32.store
(local.get $9)
(i32.load
(local.get $7)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(block $label$190
(br_if $label$190
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(local.set $7
(i32.load
(select
(i32.add
(i32.add
(i32.shl
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
(i32.const 2)
)
(i32.load offset=96
(local.get $2)
)
)
(i32.const -4)
)
(i32.const 1048804)
(local.get $7)
)
)
)
(br $label$18)
)
(i64.store offset=4 align=4
(local.get $0)
(i64.load offset=272
(local.get $2)
)
)
(local.set $5
(i32.const 1)
)
(i32.store
(local.get $0)
(i32.const 1)
)
(i32.store
(i32.add
(local.get $0)
(i32.const 12)
)
(i32.load
(i32.add
(local.get $2)
(i32.const 280)
)
)
)
(br $label$6)
)
(block $label$191
(block $label$192
(br_if $label$192
(local.tee $7
(i32.load offset=104
(local.get $2)
)
)
)
(local.set $7
(i32.const 1114112)
)
(br $label$191)
)
(i32.store offset=104
(local.get $2)
(local.tee $7
(i32.add
(local.get $7)
(i32.const -1)
)
)
)
(local.set $7
(i32.load
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.get $7)
(i32.const 2)
)
)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $7)
)
(i32.store
(local.tee $9
(i32.add
(i32.add
(local.get $2)
(i32.const 272)
)
(i32.const 8)
)
)
(i32.load
(local.tee $7
(i32.add
(local.get $12)
(i32.const 8)
)
)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$44
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(block $label$193
(br_if $label$193
(i32.ne
(i32.load
(select
(local.tee $19
(i32.add
(i32.load offset=96
(local.get $2)
)
(i32.shl
(local.tee $18
(i32.add
(local.tee $16
(i32.load offset=104
(local.get $2)
)
)
(i32.const -1)
)
)
(i32.const 2)
)
)
)
(i32.const 1048804)
(local.get $16)
)
)
(i32.const 118)
)
)
(block $label$194
(block $label$195
(br_if $label$195
(local.get $16)
)
(local.set $16
(i32.const 1114112)
)
(br $label$194)
)
(i32.store offset=104
(local.get $2)
(local.get $18)
)
(local.set $16
(i32.load
(local.get $19)
)
)
)
(call $no_proto_js::error::NP_Error::unwrap::h2cd10ecd9103995e
(i32.add
(local.get $2)
(i32.const 288)
)
(local.get $16)
)
(i32.store
(local.get $9)
(i32.load
(local.get $7)
)
)
(i64.store offset=272
(local.get $2)
(i64.load align=4
(local.get $12)
)
)
(br_if $label$43
(i32.eq
(i32.load offset=288
(local.get $2)
)
(i32.const 1)
)
)
(call $alloc::slice::::to_owned::h28fdfb5917cb7a4e
(i32.add
(local.get $2)
(i32.const 256)
)
(i32.const 1060988)
(i32.const 0)
)
(call $\20as\20core::clone::Clone>::clone::hb2ed7288767aec08
(i32.add
(local.get $2)
(i32.const 304)
)
(i32.add
(local.get $2)
(i32.const 128)
)
)
(call $