Hello. I'm writing a blog post where I'm mentioning Erjang, specifically in regard to how it uses a shared heap (or rather, the JVM does). Are there any recent benchmarks of BEAM vs Erjang performance, specifically in regard to things which would benefit from a shared heap? (e.g. message passing performance)
Sorry about the late reply -
We have a CI server which also runs some performance tests - specifically, it runs the estone suite.
You asked specifically about message passing, and I'll address that, but first let me tell how the overall performance is...:
Overall, Erjang is performing slightly better than BEAM - as measured by the "EStones" number, which is a weighted average of the results of a number of microbenchmarks.
However, there are great variations in Erjang's performance among the different tests.
Where Erjang shines:
* Message passing of huge messages
* Floating-point arithmetics
Where Erjang has significant problems at the moment, performance-wise:
* Scheduling / context switches (this includes timers)
* Binary handling
For FP calculations, Erjang is >10x faster than Erlang. I have no idea why Erlang would be that sluggish; after all, BEAM bytecode has special instructions for FP operations.
I have plans for the scheduler, but hadn't had time to do something about them. (Recently I was going to look at it, but ended up fixing the >=R14B01 file subsystem problem instead...)
As for binaries - can't remember what the issue is there, if it is known, but it's twice as fast as it used to be - something was done about it shortly after the CI server started making performance graphs.
And, finally, message passing and inter-heap copying:
The EStone suite contains three message passing benchmarks: for "small", "medium" and "huge" messages.
The sizes of the messages (as measured by erts_debug:flat_size/1) are 3, 27 and 990 words, respectively.
Erjang's score on these benchmarks, relative to BEAM's, are:
* Small: 40-45%
* Medium: ~70%
* Huge: ~800%
So - as expected - the larger the message, the larger the gain.
The horrible numbers for the "small" and "medium" benchmarks are (afaik) due to scheduler problems.
Regards,
Erik Søe Sørensen