[erlang-questions] new float_to_list/2 BIF - critique wanted
Sun May 3 15:18:34 CEST 2009
I've been struggling with the very low performance of erlang term to
JSON conversion with mochijson. It turned out that mochinums:digits/1
is very slow. So I've tried using io_lib:format/2 and it turned to be
still not satisfying. Then I've tried the float_to_list/1 BIF, but it
always produced 23-char long list, while I need only ~9 digits. So
I've implemented BIF float_to_list/2, which accepts additional
parameter Precision. Tested only on Linux. Win32 and vxworks code is
Patch is attached. Critique is very welcomed! If the patch is valuable
I'll send it to the erlang-patches mailing list
Every minute is to be grasped.
Time waits for nobody.
-- Inscription on a Zen Gong
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5162 bytes
Desc: not available
More information about the erlang-questions