[erlang-questions] Why is decode_packet so fast?

Paul Fisher pfisher@REDACTED
Sat Jan 17 22:32:20 CET 2009


Sergey S wrote:
> it appears that people who wrote decode_packet, made it really-really
> fast. I noted how good decode_packet is and then tried to find out the
> sources. But didn't find the implementation in
> /usr/lib/erlang/lib/kernel-2.12.5/src/erlang.erl. So my attempt to
> find out what made decode_packet so fast failed =)
> 
> Please, tell me where the implementation of decode_packet is placed.

I believe that it is implemented as a built-in function.

I would also offer that if you have not compiled your version with HiPE 
enabled, you should give that a try as it has a good chance of improving 
the performance of binary decoding type of tasks.


--
paul





More information about the erlang-questions mailing list