msg.Service: optimize a bit (#2374)
Make the NewSRV and friends slightly smarter. Optimize the calling of
targetStrip which is almost certainly not used.
Added benchmark show a modest improvement:
benchmark old ns/op new ns/op delta
BenchmarkNewSRV-4 300 283 -5.67%
Signed-off-by:
Miek Gieben <miek@miek.nl>
Showing
Please register or sign in to comment