tqchen opened a new pull request, #737:
URL: https://github.com/apache/tvm-ffi/pull/737

   StructuralMap currently uses the persistent `ffi::Map` container for its 
per-invocation identity-remap environment. This makes tiny expression rewrites 
pay hashing and persistent-node allocation costs even when only one or two 
variables are present.
   
   Use an owning linear vector for up to eight identities, then migrate once to 
an owning `std::unordered_map` so larger traversals retain scalable lookup. The 
key and mapped value remain owned throughout the traversal, and replacement of 
an existing identity preserves current semantics.
   
   The accompanying regression crosses the growth boundary with 16 distinct 
free variables and proves that each callback runs once and both uses share the 
final output identity.
   
   Measured with GCC 14.3, `-O3 -DNDEBUG`, pinned to one Ryzen 7950X CPU, a 
two-node minimal registered-hook fixture with a repeated free variable dropped 
from approximately 153 ns total (`ffi::Map`) to 79.6 ns total (adaptive table). 
In the motivating 15-node TVM distinct split/fuse no-op fixture, StructuralMap 
reaches parity with the existing virtual mutator at approximately 34.8 vs 35.0 
ns/node. The full ASan-enabled C++ suite passes (476 tests).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to