You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| MessagePack |~50 bytes | Fast (binary) |`msgpack` package |
37
-
| JSON |~120 bytes | Medium | Built-in |
38
-
| Pickle |~40 bytes | Fast | Built-in (unsafe) |
39
-
40
-
MessagePack provides a compact binary format with strong typing, making it well-suited for cross-process communication over stdin/stdout.
24
+
All communication happens via a binary protocol over stdin/stdout. Each request is serialized, prefixed with a 4-byte big-endian length header, and read by `bridge.py`. Python processes the request and writes a response frame back.
Batch operations combine all requests into one MessagePack frame, eliminating N-1 round-trips.
41
+
Each `eval()`/`exec()` call involves a full round-trip: serialize, write to stdin, read from stdout, and deserialize. Batch operations combine all requests into a single frame, eliminating N-1 round-trips.
0 commit comments