[erlang-questions] [ANN] io_libc -- fast formatting NIF
Anthony Ramine
n.oxyde@REDACTED
Sun Mar 9 20:38:03 CET 2014
What about hooking up into erts_*printf?
--
Anthony Ramine
Le 9 mars 2014 à 20:25, Danil Zagoskin <z@REDACTED> a écrit :
> 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 | z@REDACTED
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list