Skip to content

doc: three-column Compiler Explorer comparison, shorter function names, CE note in CLAUDE.md - #141

Open
jll63 wants to merge 4 commits into
boostorg:developfrom
jll63:doc/misc
Open

jll63 wants to merge 4 commits into
boostorg:developfrom
jll63:doc/misc

Conversation

@jll63

@jll63 jll63 commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

(Written by Claude Code, on behalf of @jll63.)

Follow-up to #134.

Three columns for the dispatch comparison

The "Compare the three calls on Compiler Explorer" link on performance.adoc used to open two columns: the virtual function call beside a translation unit holding both method calls, whose assembly pane showed both together. It now opens one column per call, each with its source above its assembly:

virtual_function method_via_ref method_via_virtual_ptr
source source source
assembly assembly assembly

dev/ce_link.py replaces --beside and --beside-tag with --column EXAMPLE:TAG, given once per column. A column holds the content region of its example minus every nested tagged region except TAG, so it compiles that one function only:

dev/ce_link.py \
    --column doc/modules/ROOT/examples/dispatch_virtual_function.cpp:virtual_function \
    --column doc/modules/ROOT/examples/dispatch_open_method.cpp:method_via_ref \
    --column doc/modules/ROOT/examples/dispatch_open_method.cpp:method_via_virtual_ptr

The "Library functions" filter stays off in all three columns: it would hide method_via_virtual_ptr completely, since every one of its instructions is dispatch code inlined from the headers. With the filter off, the method columns carry about 1,000 lines of library code, but each function still appears within the first screen.

Function names

call_virtual_function, call_via_ref and call_via_virtual_ptr become virtual_function, method_via_ref and method_via_virtual_ptr. The rename covers their tags, the listings and prose of performance.adoc, and the helpers with the same names in ast.cpp, ast_virtual_function_2.cpp and both custom RTTI examples. No page shows those helpers.

CLAUDE.md

A new section, "Compiler Explorer links in the documentation", says that doc-page links use normal includes, with Boost picked from CE's Libraries list. The flattened headers are for the ce/ examples only. It also says what follows from that:

  • a link runs the Boost release CE offers (1.92), not this tree;
  • nothing regenerates a link when its example changes.

Testing

  • Examples: the six changed examples build with -Wall -Wextra -Werror under gcc and clang-22, at -O2 -DNDEBUG, and print what they did before.
  • Compiler Explorer: each of the three columns compiles through CE's API, with the link's compiler, options, libraries and filters, and its assembly pane opens on its function. CE accepts the link.
  • Docs: doc/build_antora.sh reports no warnings for performance.adoc. The rendered href matches the generated URL, and the page has no old names left. The basics and motivation links come out of the script unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01958YRGfNfb6SfQS9v4hWTr

jll63 and others added 4 commits November 4, 2026 16:15
The flattened-headers section was the only CE guidance, and it describes
including the headers by URL. Say that the links on the doc pages
include <boost/openmethod.hpp> as usual, with Boost from CE's Libraries
list, and that dev/ce_link.py generates them. Note what that implies:
the link runs the Boost release CE offers, and nothing regenerates it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comparison opened two columns: the virtual function call beside a
translation unit with both method calls, whose assembly pane showed the
two together. Give each call its own column instead, its source above
its assembly.

dev/ce_link.py replaces --beside and --beside-tag with --column
EXAMPLE:TAG, once per column. A column holds the content region of its
example minus every nested region except TAG, so that it compiles one
call only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The names now say what is called, beside call_virtual_function, in the
listings of performance.adoc and in the Compiler Explorer comparison.
ast.cpp and the two custom RTTI examples have the same helpers, outside
any tagged region, and are renamed with them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
call_virtual_function, call_method_via_ref and call_method_via_virtual_ptr
become virtual_function, method_via_ref and method_via_virtual_ptr, with
their tags, in the listings of performance.adoc, in its Compiler
Explorer comparison, and in the examples that carry the same helpers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://141.openmethod.prtest3.cppalliance.org/libs/openmethod/doc/html/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-11-04 22:43:14 UTC

@codecov

codecov Bot commented Nov 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.57%. Comparing base (b681217) to head (eea7e9c).
⚠️ Report is 24 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #141   +/-   ##
========================================
  Coverage    92.56%   92.57%           
========================================
  Files           29       29           
  Lines         2314     2316    +2     
  Branches       699      699           
========================================
+ Hits          2142     2144    +2     
  Misses         111      111           
  Partials        61       61           

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 456d95c...eea7e9c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants