Page MenuHomePhabricator

Move CTxMemPoolEntry class to its own module and inline class's function
ClosedPublic

Authored by PiRK on Mar 27 2024, 10:56.

Details

Summary

The rationale for inlining the functions is that having them in the same translation unit may improve performance of hot loops. See discussion starting at this message:
https://github.com/bitcoin/bitcoin/pull/17786#issuecomment-575673666

This is a backport of core#17786, core#26609 and core#26545

Depends on D15789

Test Plan

ninja all check-all bench-bitcoin

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK published this revision for review.Mar 27 2024, 11:12
src/bench/mempool_eviction.cpp
7 ↗(On Diff #46500)

the logic adopted by Core wrt to import sorting seems to be that kernel modules are regular local modules, sorted with the others, except in bitcoin_chainstate.cpp, init.cpp and validation.cpp where they are placed at the top.
I followed that sorting in this backport.

This revision is now accepted and ready to land.Mar 27 2024, 14:21