RFC - fat pointer class, evolution of YOMM2 -- Reddit Q&A

reddit.pngQuestion from reddit poster: I am preparing to release a new feature, a fat pointer class (virtual_ptr), that makes method dispatch even more efficient. Dispatching a method with one virtual argument via a virtual_ptr takes only three instructions and two independent memory reads. As an interesting side-effect, it is now possible to use YOMM2 with non polymorphic classes hierarchies.

RFC - fat pointer class, evolution of YOMM2

From the discussion:

I am preparing to release a new feature, a fat pointer class (virtual_ptr), that makes method dispatch even more efficient. Dispatching a method with one virtual argument via a virtual_ptr takes only three instructions and two independent memory reads. As an interesting side-effect, it is now possible to use YOMM2 with non polymorphic classes hierarchies.

Once I increase the semantic minor version number, I will mostly be stuck with the API. So, if you are interested and in the mood, please review the documentation.

Beyond this, I have been mulling a major version bump. There are a few stuff that are deprecated, and I would like to get rid of them.

Also, I wonder if it would be a good time to switch to C++20. The internals would be a lot simpler and cleaner if I could use concepts.

I have a few major developments on the radar:I have a few major developments on the radar:

  • dispatch on std::any and std::variant
  • "fat" versions of std::any and std::variant (in the manner of virtual_ptr)
  • going headers only
  • related to the former: tunable runtime
  • quasi static initialization of method tables

I wonder if it would be better to wait until these items are completed before switching to C++20 and putting the C++17 code in bugfix only mode.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.