xpdt: eXPeditious Data Transfer
xpdt
xpdt is (yet another) language for defining data-types and generating code for serializing and deserializing them. It aims to produce code with little or no overhead and is based on fixed-length representations which allows for zero-copy deserialization and (at-most-)one-copy writes (source to buffer).
The generated C code, in particular, is highly optimized and often permits the elimination of data-copying for writes and enables optimizations such as loop-unrolling for fixed-length objects. This can lead to read speeds in excess of 500 million objects per second (~1.8 nsec per object).
Examples
The xpdt source language looks similar to C struct definitions:
struct timestamp {
u32 tv_sec;
u32 tv_nsec;
};
struct point {
i32 x;
i32 y;
i32 z;
};
struct line {
timestamp time;
point line_start;
point line_end;
bytes