Closed Totodore closed 2 months ago
Report | Sun, April 21, 2024 at 20:47:25 UTC |
Project | Socketioxide |
Branch | zero-copy-bytes-take2 |
Testbed | ubuntu-latest |
Benchmark | Latency | Latency Results nanoseconds (ns) |
---|---|---|
engineio_packet/decode/Decode packet binary b64 | ➖ (view plot) | 86.264 |
engineio_packet/decode/Decode packet message | ➖ (view plot) | 46.464 |
engineio_packet/decode/Decode packet noop | ➖ (view plot) | 36.409 |
engineio_packet/decode/Decode packet ping/pong | ➖ (view plot) | 31.365 |
engineio_packet/decode/Decode packet ping/pong upgrade | ➖ (view plot) | 35.333 |
engineio_packet/encode/Encode packet binary b64 | ➖ (view plot) | 55.198 |
engineio_packet/encode/Encode packet message | ➖ (view plot) | 30.241 |
engineio_packet/encode/Encode packet noop | ➖ (view plot) | 30.119 |
engineio_packet/encode/Encode packet open | ➖ (view plot) | 292.780 |
engineio_packet/encode/Encode packet ping/pong | ➖ (view plot) | 29.663 |
engineio_packet/encode/Encode packet ping/pong upgrade | ➖ (view plot) | 29.959 |
extensions/concurrent_get | ➖ (view plot) | 25.880 |
extensions/concurrent_get_inserts | ➖ (view plot) | 31.057 |
extensions/concurrent_inserts | ➖ (view plot) | 24.175 |
socketio_packet/decode/Decode packet ack on / | ➖ (view plot) | 276.560 |
socketio_packet/decode/Decode packet ack on /custom_nsp | ➖ (view plot) | 292.440 |
socketio_packet/decode/Decode packet binary ack (b64) on / | ➖ (view plot) | 511.410 |
socketio_packet/decode/Decode packet binary ack (b64) on /custom_nsp | ➖ (view plot) | 536.560 |
socketio_packet/decode/Decode packet binary event (b64) on / | ➖ (view plot) | 599.700 |
socketio_packet/decode/Decode packet binary event (b64) on /custom_nsp | ➖ (view plot) | 619.570 |
socketio_packet/decode/Decode packet connect on / | ➖ (view plot) | 62.290 |
socketio_packet/decode/Decode packet connect on /custom_nsp | ➖ (view plot) | 76.708 |
socketio_packet/decode/Decode packet event on / | ➖ (view plot) | 350.500 |
socketio_packet/decode/Decode packet event on /custom_nsp | ➖ (view plot) | 368.720 |
socketio_packet/decode/Decode packet event with ack on / | ➖ (view plot) | 349.560 |
socketio_packet/decode/Decode packet event with ack on /custom_nsp | ➖ (view plot) | 368.280 |
socketio_packet/encode/Encode packet ack on / | ➖ (view plot) | 118.160 |
socketio_packet/encode/Encode packet ack on /custom_nsp | ➖ (view plot) | 121.120 |
socketio_packet/encode/Encode packet binary ack (b64) on / | ➖ (view plot) | 313.160 |
socketio_packet/encode/Encode packet binary ack (b64) on /custom_nsp | ➖ (view plot) | 317.860 |
socketio_packet/encode/Encode packet binary event (b64) on / | ➖ (view plot) | 399.640 |
socketio_packet/encode/Encode packet binary event (b64) on /custom_nsp | ➖ (view plot) | 418.910 |
socketio_packet/encode/Encode packet connect on / | ➖ (view plot) | 53.156 |
socketio_packet/encode/Encode packet connect on /custom_nsp | ➖ (view plot) | 55.337 |
socketio_packet/encode/Encode packet event on / | ➖ (view plot) | 122.620 |
socketio_packet/encode/Encode packet event on /custom_nsp | ➖ (view plot) | 126.530 |
socketio_packet/encode/Encode packet event with ack on / | ➖ (view plot) | 122.550 |
socketio_packet/encode/Encode packet event with ack on /custom_nsp | ➖ (view plot) | 126.140 |
Motivation
Currently the
Message
packet variant is backed by aString
. This leads to a useless data clone when slicing to remove the first byte (the engineio packet type).Solution
The
Str
type is backed by aBytes
and therefore can be sliced into any number of sub-Bytes.