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: improve Decoder string unescaping performance #446

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 26, 2023

  1. feat: improve Decoder string unescaping performance

    before
    goos: darwin
    goarch: arm64
    pkg: benchmark
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2396	    501217 ns/op	  610443 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2370	    506517 ns/op	  635933 B/op	   10006 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2365	    500938 ns/op	  612078 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2216	    508809 ns/op	  643572 B/op	   10006 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2354	    505128 ns/op	  621201 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2235	    506122 ns/op	  631196 B/op	   10006 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2334	    501138 ns/op	  611282 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2360	    501009 ns/op	  609720 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2343	    505980 ns/op	  608884 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2362	    504268 ns/op	  614357 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	      94	  12573430 ns/op	  586036 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	      96	  12545696 ns/op	  586047 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	      93	  12660176 ns/op	  591675 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	      85	  12624620 ns/op	  586036 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	      94	  12561482 ns/op	  591631 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	      94	  12597026 ns/op	  586034 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	      93	  12598319 ns/op	  586040 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	      93	  12613099 ns/op	  586039 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	      94	  12589107 ns/op	  597210 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	      96	  12599589 ns/op	  586044 B/op	   10014 allocs/op
    
    after
    goos: darwin
    goarch: arm64
    pkg: benchmark
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2396	    500616 ns/op	  615926 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2367	    508130 ns/op	  632242 B/op	   10006 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2360	    507290 ns/op	  622408 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2344	    503449 ns/op	  612675 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2325	    505496 ns/op	  617994 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2314	    504651 ns/op	  611184 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2290	    507516 ns/op	  615741 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2355	    514382 ns/op	  618502 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2136	    509533 ns/op	  617787 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Unmarshal-12         	    2216	    507166 ns/op	  612041 B/op	   10005 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	    2430	    489476 ns/op	  586677 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	    2415	    527139 ns/op	  588856 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	    2358	    489797 ns/op	  586700 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	    2437	    487946 ns/op	  586247 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	    2415	    488028 ns/op	  586901 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	    2430	    490985 ns/op	  586895 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	    2421	    488670 ns/op	  586898 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	    2419	    487473 ns/op	  586249 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	    2406	    489513 ns/op	  586686 B/op	   10014 allocs/op
    Benchmark_Decode_LargeSlice_EscapedString_GoJson/Decode-12            	    2380	    493454 ns/op	  586254 B/op	   10014 allocs/op
    orisano committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    0c2acb8 View commit details
    Browse the repository at this point in the history