The BLOCK version creates a scope. That adds overhead, so the BLOCK version is a bit slower. I don't remember how much, but it's surely noting substantial.
On the other hand, the BLOCK version allows the use of multiple statements, including variable declarations. It's usually easier to read too.
Update: I since discovered that both versions add a scope. (See higher up post.) That doesn't change the fact that map BLOCK is a bit slower; it just means I don't know why.
In reply to Re: syntax of map operator
by ikegami
in thread syntax of map operator
by sman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |