[erlang-questions] bit syntax slower than bit operations
Sat Sep 1 23:45:52 CEST 2007
Matthias Radestock <matthias@REDACTED> writes:
> Unfortunately, my tests indicate that the latter version is about twice
> as fast, using R11B-5 under Linux on x86.
> Does the bit-syntax compilation produce rather inefficient code?
Yes, it could be better.
In fact, I managed to optimize the BEAM instruction for matching out
an integer from a binary so that decode_compact/1 now runs somewhat
faster than decode_verbose/1 on my computer (Sparc/Solaris).
I hope to optimize construction of binaries in the same way.
Those improvements will be included in R12B, as well as other improvements
and optimizations of the bit syntax that we have been working on.
Thanks for pointing out the problem.
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions