Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The changes in jmoiron#635 changed the some of the output types of In to pointers. This takes less time but it also changed the types in the output of In in a way that I think is more aggressive than I would have preferred. I'm also not 100% convinced that using pointers to types like `int` and `string` would provide an overall performance benefit when you factor in GC. Despite that, timings did get worse: pre-change: ``` BenchmarkIn-4 3136129 376 ns/op 272 B/op 4 allocs/op BenchmarkIn1k-4 171588 6602 ns/op 19488 B/op 3 allocs/op BenchmarkIn1kInt-4 157549 7502 ns/op 19488 B/op 3 allocs/op BenchmarkIn1kString-4 155502 7604 ns/op 19488 B/op 3 allocs/op ``` post-change: ``` BenchmarkIn-4 3007132 396 ns/op 272 B/op 4 allocs/op BenchmarkIn1k-4 175978 6768 ns/op 19488 B/op 3 allocs/op BenchmarkIn1kInt-4 120422 10125 ns/op 19488 B/op 3 allocs/op BenchmarkIn1kString-4 108813 10755 ns/op 19488 B/op 3 allocs/op ``` I'd prefer to keep `[]int{..}` producing ints instead of `*int` even if it means losing ~25% of perf on these special cased functions.
- Loading branch information