On Tue, Jan 10, 2017 at 1:45 PM, Mathias Gaunard < mathias.gaunard@ens-lyon.org> wrote:
On 10 January 2017 at 14:35, Zach Laine
wrote: I've personally played a lot with expression templates, with and without Proto. Very quickly it becomes hairy, consumes huge amounts of memory that is never reclaimed, and takes very long to compile. I don't know how much better it is with Yap, but that's definitely a major problem and any new solution should try to address it. Symbols need to be short, and no evaluation should ever depend on the scalability of overloading or partial template specializations.
I agree with all of these complaints. This is in fact why I wrote Yap. The compile times are very good, even for an obnoxious number of terminals (thousands), and there is no memory allocated at all -- or did you mean compiler memory usage? I haven't looked at that.
The design used by Eigen or by some valarray implementations, while not necessarily the most elegant, is simple and scales well, but involves coupling the representation of the tree with its evaluation.
My hope is that the Yap design is easy enough to use that custom ET code is no longer necessary. Zach