Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid crashes, faster varint, fewer dependencies
Summary: wdt could corrupt memory on bad input re speed: buck build mode/opt and : [19:27 devbig650.prn1:fbcode(sg2)]$ ./buck-out/gen/wdt/test_encdeci64_perf ============================================================================ wdt/test/test_encdeci64_perf.cpp relative time/iter iters/s ============================================================================ BM_encodeDecodeI64(0) 10.67ns 93.73M BM_encodeDecodeI64(m10k) 3.67ns 272.66M BM_encodeDecodeI64(10000) 3.67ns 272.66M BM_encodeDecodeI64(m1k) 2.67ns 374.93M BM_encodeDecodeI64(1000) 2.67ns 374.93M BM_encodeDecodeI64(m100) 2.67ns 374.93M BM_encodeDecodeI64(100) 2.77ns 360.85M BM_encodeDecodeI64(m10) 2.05ns 488.55M BM_encodeDecodeI64(10) 2.05ns 488.34M BM_encodeDecodeI64_vi(0) 13.56ns 73.73M BM_encodeDecodeI64_vi(m10k) 7.33ns 136.34M BM_encodeDecodeI64_vi(10000) 7.33ns 136.34M BM_encodeDecodeI64_vi(m1k) 5.00ns 199.97M BM_encodeDecodeI64_vi(1000) 5.00ns 199.97M BM_encodeDecodeI64_vi(m100) 5.00ns 199.97M BM_encodeDecodeI64_vi(100) 5.00ns 199.97M BM_encodeDecodeI64_vi(m10) 2.38ns 420.09M BM_encodeDecodeI64_vi(10) 2.38ns 420.53M BM_encodeDecodeI64_str(0) 44.63ns 22.41M BM_encodeDecodeI64_str(m10k) 18.67ns 53.55M BM_encodeDecodeI64_str(10000) 18.69ns 53.50M BM_encodeDecodeI64_str(m1k) 16.08ns 62.20M BM_encodeDecodeI64_str(1000) 16.08ns 62.19M BM_encodeDecodeI64_str(m100) 16.08ns 62.20M BM_encodeDecodeI64_str(100) 16.08ns 62.20M BM_encodeDecodeI64_str(m10) 13.38ns 74.74M BM_encodeDecodeI64_str(10) 13.38ns 74.73M BM_encodeDecodeI64_vi_str(0) 31.10ns 32.16M BM_encodeDecodeI64_vi_str(m10k) 22.70ns 44.04M BM_encodeDecodeI64_vi_str(10000) 22.72ns 44.02M BM_encodeDecodeI64_vi_str(m1k) 21.37ns 46.80M BM_encodeDecodeI64_vi_str(1000) 21.37ns 46.79M BM_encodeDecodeI64_vi_str(m100) 21.37ns 46.80M BM_encodeDecodeI64_vi_str(100) 21.35ns 46.84M BM_encodeDecodeI64_vi_str(m10) 20.21ns 49.47M BM_encodeDecodeI64_vi_str(10) 20.09ns 49.78M ============================================================================ _vi is the folly varint version, without _vi is the new, faster, more compact one Reviewed By: uddipta Differential Revision: D4225139 fbshipit-source-id: d85683fe70416738208883e86a6dd5f6db2d05b2
- Loading branch information