Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add inlinability to ByteBuffer getters. (#1220)
Motivation: In complex ByteBuffer parsing code a surprising amount of cost comes from retain/release operations that are emitted by the compiler around calls to readerIndex/writerIndex, readableBytes/writableBytes, and ByteBufferSlice._lowerBound. These are all straightforward computed properties based on usableFromInline operations, and so they can be made inlinable. Modifications: Joannis' sample benchmark runtime is halved by eliminating retains/releases. Result: Better, faster parsing code.
- Loading branch information