tqchen commented on PR #719:
URL: https://github.com/apache/tvm-ffi/pull/719#issuecomment-5470325297

   Assembly and benchmark follow-up:
   
   Using GCC 11.4 with `-O3 -DNDEBUG`, 50,000,000 iterations per sample, 
median-of-five sampling, and three runs pinned to CPU 0:
   
   - `const ObjectType* -> AnyView -> const ObjectType*`: 2.50381 ns/op before, 
2.35846 ns/op after (5.8% lower). Identity baselines were 1.39015 and 1.39103 
ns/op.
   - `ObjectRef -> Any -> move cast<ObjectRef>`: 2.78202 ns/op before, 1.66852 
ns/op after (40.0% lower). The patched path matches its 1.66948 ns/op identity 
baseline.
   
   `objdump -d -Mintel` confirms that the AnyView round trip no longer emits 
the redundant `cmp type_index, 0x3f; jle cold` lower-bound branch, while 
retaining object-type compatibility validation. The Any move round trip no 
longer loads/tests `type_index` and has no error or destructor call path; it 
reduces to ownership pointer moves plus the nullable-object branch.


-- 
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