JuliaLang/julia — Issue #414: Pure function notation
Author: si14
Created: 2012-02-20 14:17:20+00:00
State: open

There are a lot of optimization opportunities coming from the ability to distinguish pure functions from unpure. The most important one (IMO) is deforestation: when you have something like `sum(transpose(transpose(generate_random_matrix(M, N)) * SCALAR))`, you can optimize away an entire matrix construction if you know that `sum` consumes matrix, `generate_random_matrix` builds one and all functions that was applied to generated matrix are pure.