Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 1.38 KB

README.md

File metadata and controls

26 lines (19 loc) · 1.38 KB

YOMM2 on Compiler Explorer

YOMM2 is available on Compiler Explorer. Make sure that you also select Boost version 1.74 or above, and you probably want to add the -O3 -DNDEBUG compiler switches.

The following examples are available:

  • The examples from the slides.
  • The matrix example from the GitHub langing page.

The following examples use the diff mode to compare open methods with the equivalent (closed) virtual function based approaches.

YOMM2 can also add polymorphic operations to non-polymorphic classes.

When virtual_ptr is used in combination with generated static offsets, method dispatch matches the speed of virtual functions. It is also possible to generate dispatch data that can be installed without calling update, a fairly expensive operaiton. See this example.