You may be wondering why a new benchmark for this. Well, I have three reasons:
- all of the other benchmarks I could find on internet were outdated
- I always prefer to test things for myself
- as I always test things for myself, I took some time to write a little benchmark tool that will be used for more benchmarks and that also allows me to test them on future releases of flash, very quickly
Here it is:
Quick resume of my results
Signals seem to be faster than Flash Events in most cases. But I sometimes have strange results, like a Signal with no argument is sometimes slower than a Signal with 1 or more arguments. Also if you try with a low iteration number (1000 for me), you might have incoherent results (compared with a higher iteration number).
It’s also important to notice that when we have 4 and more arguments (with Signals), the time suddenly increases more than when comparing Signals with 2 and 3 arguments. A quick look at the code and we can see that there is a small optimization going on there, but only for up to 3 arguments.
Don’t hesitate to post your results (you can click on the “Copy results to clipboard” and paste it in the comment)