What is the performance difference between native and bytecode Erlang modules?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For code that actually does a lot of work (as opposed to spending most of its time waiting for messages or calling built-in functions), typical speedups would be between 8 and 20 times.
This also depends a lot on exactly what the code does: loops over floating point operations or manipulation of binaries/bitstrings tend to get the best speedups, while more normal tuple-and-list-manipulating code might not get more than 8-10 times faster.
Also, keep in mind that a loop compiled to native code will not be much faster if the loop body is mainly calling other modules that are not compiled to native.
(It’s been a while since I looked at fresh benchmark results, but I don’t think a lot has changed.)