commit | 68c10286c795e286c3efaa7df6d52d12af446d57 | [log] [tgz] |
---|---|---|
author | Jason A. Donenfeld <Jason@zx2c4.com> | Thu Apr 19 23:46:52 2018 +0200 |
committer | Brad Fitzpatrick <bradfitz@golang.org> | Thu Apr 19 22:16:24 2018 +0000 |
tree | db549f58c987a30f011c1f7247eee934b85bf298 | |
parent | 1c439e6e37c87c9543cb1860c3b8d174658b80ca [diff] |
syscall: avoid extra syscall on send/recvmsg on Linux By simply rearranging the logic, we avoid the overhead of a superfluous call to getsockopt. For, if p is already non empty, there's no point in having to check if we need to attach dummy payload. This has performance benefits when using send/recvmsg for high speed communications. Change-Id: Id85cff17328ecbf6d09dd52fbeeaa691dbe69b75 Reviewed-on: https://go-review.googlesource.com/108338 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.