-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
speculativeWhether the change will be implemented is speculativeWhether the change will be implemented is speculative
Description
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. So it would be handy to have an ability to say that the particular function is pure.
Metadata
Metadata
Assignees
Labels
speculativeWhether the change will be implemented is speculativeWhether the change will be implemented is speculative