67d3a78123
Motivation: PP0.equals has a bytecode size of 476. This is above the default inlining threshold of OpenJDK. Modifications: Slightly change the method to reduce the bytecode size by > 50% to 212 bytes. Result: The bytecode size is dramatically reduced, making the method a candidate for inlining. The relevant code in our application (gRPC) that relies heavily on equals comparisons, runs some ~10% faster. The Netty JMH benchmark shows no performance regression. Current 4.1: PlatformDependentBenchmark.unsafeBytesEqual 10 avgt 20 7.836 ± 0.113 ns/op PlatformDependentBenchmark.unsafeBytesEqual 50 avgt 20 16.889 ± 4.284 ns/op PlatformDependentBenchmark.unsafeBytesEqual 100 avgt 20 15.601 ± 0.296 ns/op PlatformDependentBenchmark.unsafeBytesEqual 1000 avgt 20 95.885 ± 1.992 ns/op PlatformDependentBenchmark.unsafeBytesEqual 10000 avgt 20 824.429 ± 12.792 ns/op PlatformDependentBenchmark.unsafeBytesEqual 100000 avgt 20 8907.035 ± 177.844 ns/op With this change: PlatformDependentBenchmark.unsafeBytesEqual 10 avgt 20 5.616 ± 0.102 ns/op PlatformDependentBenchmark.unsafeBytesEqual 50 avgt 20 17.896 ± 0.373 ns/op PlatformDependentBenchmark.unsafeBytesEqual 100 avgt 20 14.952 ± 0.210 ns/op PlatformDependentBenchmark.unsafeBytesEqual 1000 avgt 20 94.799 ± 1.604 ns/op PlatformDependentBenchmark.unsafeBytesEqual 10000 avgt 20 834.996 ± 17.484 ns/op PlatformDependentBenchmark.unsafeBytesEqual 100000 avgt 20 8757.421 ± 187.555 ns/op |
||
---|---|---|
all | ||
buffer | ||
codec | ||
codec-dns | ||
codec-haproxy | ||
codec-http | ||
codec-http2 | ||
codec-memcache | ||
codec-mqtt | ||
codec-redis | ||
codec-smtp | ||
codec-socks | ||
codec-stomp | ||
codec-xml | ||
common | ||
example | ||
handler | ||
handler-proxy | ||
license | ||
microbench | ||
resolver | ||
resolver-dns | ||
tarball | ||
testsuite | ||
testsuite-osgi | ||
transport | ||
transport-native-epoll | ||
transport-rxtx | ||
transport-sctp | ||
transport-udt | ||
.fbprefs | ||
.gitignore | ||
.travis.yml | ||
CONTRIBUTING.md | ||
LICENSE.txt | ||
NOTICE.txt | ||
pom.xml | ||
README.md | ||
run-example.sh |
Netty Project
Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients.
Links
How to build
For the detailed information about building and developing Netty, please visit the developer guide. This page only gives very basic information.
You require the following to build Netty:
- Latest stable Oracle JDK 7
- Latest stable Apache Maven
- If you are on Linux, you need additional development packages installed on your system, because you'll build the native transport.
Note that this is build-time requirement. JDK 5 (for 3.x) or 6 (for 4.0+) is enough to run your Netty-based application.
Branches to look
Development of all versions takes place in each branch whose name is identical to <majorVersion>.<minorVersion>
. For example, the development of 3.9 and 4.0 resides in the branch '3.9' and the branch '4.0' respectively.