Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:(decoder) support skip mismatche-typed value #325

Merged
merged 12 commits into from Nov 4, 2022
Merged

Conversation

AsterDY
Copy link
Collaborator

@AsterDY AsterDY commented Oct 31, 2022

Feature

  • check first char of binding value if match binded type. If not, try to skip the whole value

Benchmark

  • -benchtime=100000x count=50
name                           old time/op    new time/op    delta
Decoder_Binding_Sonic_Fast-16    27.5µs ± 2%    27.9µs ± 2%  +1.55%  (p=0.000 n=46+48)
Decoder_Binding_Sonic-16         30.8µs ± 2%    31.0µs ± 2%  +0.68%  (p=0.000 n=47+49)

name                           old speed      new speed      delta
Decoder_Binding_Sonic_Fast-16   474MB/s ± 2%   467MB/s ± 2%  -1.52%  (p=0.000 n=46+48)
Decoder_Binding_Sonic-16        424MB/s ± 2%   421MB/s ± 2%  -0.67%  (p=0.000 n=47+49)

name                           old alloc/op   new alloc/op   delta
Decoder_Binding_Sonic-16         27.3kB ± 0%    27.3kB ± 0%    ~     (p=0.499 n=49+48)
Decoder_Binding_Sonic_Fast-16    24.3kB ± 0%    24.3kB ± 0%    ~     (p=0.325 n=49+50)

name                           old allocs/op  new allocs/op  delta
Decoder_Binding_Sonic-16            137 ± 0%       137 ± 0%    ~     (all equal)
Decoder_Binding_Sonic_Fast-16      34.0 ± 0%      34.0 ± 0%    ~     (all equal)

Fuzz test

fuzz: elapsed: 3h1m24s, execs: 26007386 (4040/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h1m27s, execs: 26021440 (4663/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h1m30s, execs: 26032940 (3846/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h1m32s, execs: 26046273 (4452/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h1m36s, execs: 26056310 (3336/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h1m39s, execs: 26068162 (3908/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h1m42s, execs: 26079590 (3862/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h1m44s, execs: 26093449 (4620/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h1m47s, execs: 26105457 (4004/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h1m51s, execs: 26115312 (3284/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h1m54s, execs: 26124622 (3103/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h1m57s, execs: 26134096 (3139/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h1m59s, execs: 26144003 (3323/sec), new interesting: 93 (total: 3173)
fuzz: elapsed: 3h2m1s, execs: 26145883 (1049/sec), new interesting: 93 (total: 3173)

@AsterDY AsterDY force-pushed the feat/skip_dismatched branch 2 times, most recently from dc17b36 to 272a3de Compare November 3, 2022 08:00
@AsterDY AsterDY merged commit 02fe882 into main Nov 4, 2022
@AsterDY AsterDY deleted the feat/skip_dismatched branch November 4, 2022 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants