[erlang-questions] [ANN] io_libc -- fast formatting NIF

Danil Zagoskin <>
Sun Mar 9 20:25:11 CET 2014


Hello!

This is io_libc: https://github.com/maxlapshin/io_libc
It was created to speedup massive CSV generation but may be useful for
other purposes.

io_libc provides an erlangish interface to standard C printf().

It has very poor protection from malformed input, falling back to zeroes
and empty strings, but it is very fast.

Some examples:

erl> io_libc:format("hello, %08.3f, %s %04X!", [3.14, dead, 48879]).
<<"hello, 0003.140, dead BEEF!">>

erl> io_libc:format("%*.*f; %0*d", [8, 3, 2.7, 6, 12]).

<<"   2.700; 000012">>

-- 
Danil Zagoskin | 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140309/1c349484/attachment.html>


More information about the erlang-questions mailing list