Commit Graph

2 Commits

Author SHA1 Message Date
Laurence Withers c579349c05 Pre-size net.Buffers
This leads to a further reduction in allocations per call. Before:
	goos: linux
	goarch: amd64
	pkg: src.lwithers.me.uk/go/journal
	cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
	BenchmarkEntry-8   	12611158	    1445 ns/op	   221 B/op	     7 allocs/op
	PASS
	ok  	src.lwithers.me.uk/go/journal	19.673s

After:
	goos: linux
	goarch: amd64
	pkg: src.lwithers.me.uk/go/journal
	cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
	BenchmarkEntry-8   	13613377	     1329 ns/op	    149 B/op	      5 allocs/op
	PASS
	ok  	src.lwithers.me.uk/go/journal	19.435s
2024-02-18 14:44:20 +00:00
Laurence Withers 5ea0bbfc87 Initial working version 2024-02-18 10:31:14 +00:00