in reply to syntax of map operator
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: syntax of map operator
by JavaFan (Canon) on Jan 24, 2010 at 15:49 UTC | |
by ikegami (Patriarch) on Jan 24, 2010 at 19:01 UTC | |
by JavaFan (Canon) on Jan 24, 2010 at 22:48 UTC | |
by Anonymous Monk on Jan 25, 2010 at 04:15 UTC | |
|
Re^2: syntax of map operator
by bart (Canon) on Jan 24, 2010 at 12:57 UTC | |
by ikegami (Patriarch) on Jan 24, 2010 at 18:54 UTC |