Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add benchmarks for "insert many" operations
A couple quick benchmarks for the two "insert many" variants to help vet whether or not we should keep the "fast" route. There is definitely a speed difference, with the fast variant being about 25% faster as it can skip returning rows: go test -bench=BenchmarkClient goos: darwin goarch: arm64 pkg: github.com/riverqueue/river cpu: Apple M1 BenchmarkClient/JobInsertMany-8 312 4156647 ns/op BenchmarkClient/JobInsertManyFast-8 417 3054985 ns/op PASS ok github.com/riverqueue/river 15.709s Can't 100% decide where that leaves us. There's definitely a speed advantage, but it definitely congests the API to a degree, and having more functions make implementing features like middleware trickier.
- Loading branch information