On Sunday, March 20, 2016 at 10:44:45 AM UTC-5, Louis Dionne wrote:
[...]
Yes, I have run a couple of local tests to test performance. I could
together some report to put in the documentation. Ideally. it would be good to have a comparison with other libraries as well. I haven't compared it with Hana yet, either, which would be a good idea. However, I do know that
Paul Fultz II wrote pull the
implementation of `fit::conditional` is much faster than the implemenation used for `overload_linearly` in Hana, but I haven't done a direct comparison. I'll try to add something like that. I think it will be useful.
How so? The implementations are very similar, except Hana also allows for non-const function objects. I'd be grateful if you could provide a benchmark, perhaps I could improve Hana's implementation.
Actually looking at your implementation closer, I realized thats not the case. I originally had an implementation where I ranked the overloads, and your implementation looked similar to that when using `which`. However, after looking at it closer, it won't ever instantiate the second function if the first function is callable. Sorry for the confusion. However, one notable difference though is that fit::conditional is SFINAE- friendly, which makes it very composable. So in Fit, one can write `fit::conditional(fit::conditional(f, g), h)` and it will work as the equivalent of `fit::conditional(f, g, h)`. However, in Hana, `hana::overload_linearly(hana::overload_linearly(f, g), h)` works as the equivalent of `hana::overload_linearly(f, g)`(note the missing h). Of course, this more of a philosophical difference between Fit and Hana, as Hana lacks SFINAE-friendliness throughout the entire library and uses its own mechanism to compose failures. I don't think the Fit library is incompatible with that mechanism.
Regards, Louis
-- View this message in context: http://boost.2283326.n4.nabble.com/Fit-Formal-review-Kris-tp4684694p4684731.... Sent from the Boost - Dev mailing list archive at Nabble.com.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost