Hi Lakshay,
BTW: A polynomial class working with std::array / boost::array would be great! No allocation at all...
[…] Also, you would need to know the sizes of vectors at the compile time if arrays are to be used. Wouldn't this be too restrictive?
in my experience (scientist), low order polynomials are much more frequently used than polynomials of order >500. So it might be worthwhile to improve the low order performance, too. Concerning the std::array/boost::array, ideally you want to provide a library that can handle both dynamic and static arrays. Let's say I am user of your library, and I happen to know the order of my polynomial at compile time. Then I would like to rest assured that the library can handle and optimise this case. The Eigen library and my proposed library https://github.com/HDembinski/histogram https://github.com/HDembinski/histogram and follow this approach, they transparently work with both static and dynamic arrays/histograms. Best regards, Hans