chenzhuoyu / base64x

High performance drop-in replacement of the `encoding/base64` library
Apache License 2.0
37 stars 6 forks source link

feat: support decode json-encoded base64 #6

Closed liuq19 closed 1 year ago

liuq19 commented 1 year ago

Main changes

  1. add a encoding for decode json-encoded base64
  2. add always_inline attr for native c function to reduce the size of C functions

fuzz test

fuzz: elapsed: 15m42s, execs: 3718301 (5088/sec), new interesting: 9 (total: 59)
fuzz: elapsed: 15m45s, execs: 3732737 (4813/sec), new interesting: 9 (total: 59)
fuzz: elapsed: 15m48s, execs: 3748861 (5375/sec), new interesting: 9 (total: 59)
fuzz: elapsed: 15m51s, execs: 3762779 (4635/sec), new interesting: 9 (total: 59)
fuzz: elapsed: 15m54s, execs: 3777984 (5072/sec), new interesting: 9 (total: 59)
fuzz: elapsed: 15m57s, execs: 3793799 (5272/sec), new interesting: 9 (total: 59)
fuzz: elapsed: 16m0s, execs: 3807634 (4612/sec), new interesting: 9 (total: 59)
fuzz: elapsed: 16m3s, execs: 3822623 (4996/sec), new interesting: 9 (total: 59)
fuzz: elapsed: 16m6s, execs: 3837584 (4987/sec), new interesting: 9 (total: 59)
fuzz: elapsed: 16m9s, execs: 3851757 (4724/sec), new interesting: 9 (total: 59)
fuzz: elapsed: 16m12s, execs: 3866220 (4821/sec), new interesting: 9 (total: 59)
fuzz: elapsed: 16m15s, execs: 3879421 (4400/sec), new interesting: 9 (total: 59)
liuq19 commented 1 year ago

This fixes https://github.com/bytedance/sonic/issues/119 and https://github.com/bytedance/sonic/issues/327.