|
Boost : |
Subject: Re: [boost] [review] Review of PolyCollection starts today (May 3rd)
From: Hans Dembinski (hans.dembinski_at_[hidden])
Date: 2017-05-10 15:56:18
Hi,
I am not a Boost author, but I think I am able to give a review of PolyCollection, so here it goes.
> On 03 May 2017, at 01:46, Ion Gaztañaga via Boost <boost_at_[hidden]> wrote:
>
> Please post your comments and review to the boost mailing list (preferably), the Boost Library Incubator. or privately to the Review Manager (to me ;-). Here are some questions you might want to answer in your review:
>
> - What is your evaluation of the design?
I only looked at the interface and the description of how it works, both is great. There is nothing I would do differently.
Concerning the interface, I expected the collections to implement the std::set interface, which they mostly do. Of course, in addition they have the extra interface to do type-specific stuff. The std::set methods count, find, equal_range, lower_bound, upper_bound are missing, but the library has equivalent free functions, which I like better anyway.
> - What is your evaluation of the implementation?
I didn't look at the code. The concept as described in the documentation made a lot of sense.
> - What is your evaluation of the documentation?
I really liked the graphics which explain how objects are stored internally. The quality of the documentation is very high. Everything I looked at was very professional and made sense.
Some specifics on the tutorial section:
I understood boost::base_collection right away. This part is perfect from my POV.
boost::function_collection was not so clear to me. It is nice to keep the narrative of game development going, but like someone said before, I think it would help to give a simpler example. I felt that the benefit of using boost::function_collection was not so clearly presented as for boost::base_collection. The function pointers are all the same size, so how exactly does the optimisation enter? I assume it is not about memory allocation here, but about sorting equal function signatures into homogeneous blocks to improve branch prediction and locality, but I am not sure.
The description of boost::any_collection was clear again.
> - What is your evaluation of the potential usefulness of the library?
The library optimises the use of collections of polymorphic objects. I can see many applications. The optimisation feels so obvious now after reading the documentation that I wonder why such a library was not added sooner. It is a good thing that Boost provides a standard implementation of this optimisation so that developers don't have to reinvent it in their domain.
> - Did you try to use the library? With what compiler? Did you have any problems?
I tried to compile the tests on a Mac with Apple-clang 8.0.0. It worked after I manually specified "cxxflags=-std=c++11" in the b2 call. By the way, it would be great if b2 used the highest standard that is available by default.
> - How much effort did you put into your evaluation? A glance? A quick reading? In-depth study?
I studied the documentation, mostly the tutorial. I also studied the benchmarks with interest, and I glanced at the reference. I tried to compile the tests. All in all, I guess I spend 3 hours.
> - Are you knowledgeable about the problem domain?
Yes, as it is not very specific...
> - Do you think the library should be accepted as a Boost library?
Yes.
Best regards,
Hans
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk