primus / eventemitter3

EventEmitter3 - Because there's also a number 2. And we're faster.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The troublesome question about the emit function.

am0622 opened this issue · comments

Why do you have the above block in the emit function instead of just using the bottom block? It seems to me that the bottom block completely contains the above.
image

Why do you have the above block in the emit function instead of just using the bottom block?

For performance reasons.

Why does this improve performance? I want to know how it works.