3 ms·
I'm a bit curious as to the message processing overhead. BEAM and HIPE are relatively fast, but string processing of any kind was kind of slow back when I messe
by rcarmo 8y ago
I'm a bit curious as to the message processing overhead. BEAM and HIPE are relatively fast, but string processing of any kind was kind of slow back when I messed around with Elixir...
- im_down_w_otp 8y agoCan you be more specific in what you mean by "processing"? - Reading from the mailbox? - Destructuring and binding the content? - Operating on the data by transforming, modifying, or filtering it? etc.
- siscia 8y agoString manipulation is notoriously slow in the BEAM, mostly implementation reasons. Message passing is somehow slow as well, slower than go(Lang) of you want a comparison. But on those systems, the one that you design on the BEAM, velocity is usually not a problem. What you usually try to do is to reach a design that does not have a single bottle neck or failure point so that pretty much whatever happen you can just add machines. This turn out to be a great way to design multi{processes, cores} and multi nodes system. What you usually get on a BEAM under load is an 100% of CPU usage, even on multi core, but to be honest those core are not used as efficiently as you could. It is a matter of tradeoffs, I can quickly write multi process software that can easily scale, but I will leave on the table some raw performance number. Again it turns out that just raw numbers are not as important as they are simple to measure.
- brightball 8y agoFWIW, that’s also why use of IO Lists are strongly encouraged rather than string manipulation. It’s also why HTML with Phoenix is so fast. https://www.bignerdranch.com/blog/elixir-and-io-lists-part-2-io-lists-in-phoenix/ https://www.bignerdranch.com/blog/elixir-and-io-lists-part-2...
- brightball 8y agoUse IO List rather than strings. Same result, but much much faster. https://www.bignerdranch.com/blog/elixir-and-io-lists-part-2-io-lists-in-phoenix/ https://www.bignerdranch.com/blog/elixir-and-io-lists-part-2...