[erlang-bugs] Re: UTF8 string handling in different erlang:*** functions

Paulo Sérgio Almeida psa@REDACTED
Tue Mar 29 16:34:22 CEST 2011


On 3/29/11 3:10 PM, Nico Kruber wrote:
>> 1000000 iterations of "erlang:term_to_binary/1" took 0.02946s:
> 33944331.2966734541/s
>> 1000000 iterations of "unicode:characters_to_binary/1" took 0.667519s:
> 1498084.69871269591/s
>
> ->  looks like I should chose erlang:term_to_binary/1 since at least on my
> machine is is around twice as fast.
It's not twice but 20 times as fast. Amazing. Even though it should be 
slower, this slower is surprising.

Regards,
Paulo



More information about the erlang-bugs mailing list