[Haskell-cafe] Re[2]: [Haskell] TABI 0.1: a typeful tagged cross-language calling convention

Bulat Ziganshin bulat.ziganshin at gmail.com
Tue Jul 21 12:11:47 EDT 2009


Hello Felipe,

Tuesday, July 21, 2009, 7:38:44 PM, you wrote:

>>     * passing complex datastructures between various languages forth
>>     and back, providing faster alternative to serialization approach

> I've read the code and I don't see how tabi manages to do this.

it's not yet implemented :)))

my idea is to provide one more basic type, TABI_TABLE=6, that allows
to nest TABI_MAPs recursively. also arrays of TABI_* types may be
supported

> It is serializing as well but it is including the type and name
> information, so it seems that at best it would have the same
> overhead as just serializing the data without any metadata.

my first approach was to use just serialization (it was implemented in
Lua sources included). but then i realized that it is monkey work
- most time will be spent copying data to buffer, from buffer,
searching for delimiters, processing type conversion. i'm pretty sure
that C implementation of TABI_MAP will do its work (filling 3-4 words
per parameter) an order of magnitude faster than serialization
approach. also, serialized data anyway will be need to converted to
datastructure like TABI_MAP in order to be used by calls like _str and
_int

for Haskell code, good optimized serialization library should have
comparable speed. moreover, my current approach with malloc() calls
probably makes encoding operations much slower


if you have any specific needs, we can discuss it. my own needs is
mainly combination of first and third clauses of quoted list, so
second claim is somewhat artificial :)  it is possible but only
partially implemented


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list