[erlang-questions] binary_to_integer/1 and binary_to_float/1 and friends
Max Lapshin
max.lapshin@REDACTED
Mon Apr 30 20:18:43 CEST 2012
On Mon, Apr 30, 2012 at 10:13 PM, Bob Ippolito <bob@REDACTED> wrote:
>
> I suppose you could implement it in pure erlang without creating any
> intermediate lists, maybe it's even fast with HIPE. Floats are likely
> another story.
>
It also creates lots of intermediate objects and we both know how
"fast" erlang arithmetic is.
Floats can be parsed in the same way.
In fact parsing in C can be done in the way, you have described. And
it is many times faster, according to my benchmarks, done while
working with CSV.
You should remember that intermediate objects lead to useless GC.
More information about the erlang-questions
mailing list