OCamlPro / flambda-task-force

13 stars 1 forks source link

Specialize Pmakearray when the approximation allows to #162

Open chambart opened 8 years ago

chambart commented 8 years ago
let x = [| f x |]

If the return of f is known (through inlining or approximation of f) to be (or not to be) a floating point value, the Pmakearray primitive (implemented with a C stub testing the tag of its argument) could be replaced by the appropriate Pmakeblock(Mutable)

See https://github.com/OCamlPro/flambda-task-force/issues/160

chambart commented 8 years ago

Also Array make could build an approximation containing the size (but this would make truncate more unsafe)