Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkJSONEncoding (0.52 sec)

  1. src/log/slog/json_handler_test.go

    					String("module", "github.com/google/go-cmp"),
    					String("version", "v1.23.4"),
    					Int("count", 23),
    					Int("number", 123456),
    				)
    			}
    		})
    	}
    }
    
    func BenchmarkJSONEncoding(b *testing.B) {
    	value := 3.14
    	buf := buffer.New()
    	defer buf.Free()
    	b.Run("json.Marshal", func(b *testing.B) {
    		b.ReportAllocs()
    		for i := 0; i < b.N; i++ {
    			by, err := json.Marshal(value)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 11 17:06:26 UTC 2023
    - 6.5K bytes
    - Viewed (0)
Back to top