You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by "junrushao (via GitHub)" <gi...@apache.org> on 2026/04/14 05:55:02 UTC
[PR] perf(container): use iterator lookup instead of exception handling in Map/Dict [tvm-ffi]
junrushao opened a new pull request, #548:
URL: https://github.com/apache/tvm-ffi/pull/548
## Summary
- Replace `try { n->at(k); } catch (...)` with `n->find(k)` + iterator check in `ffi.MapGetItemOrMissing` and `ffi.DictGetItemOrMissing`
- Avoids the overhead of throwing and catching exceptions on every missing-key lookup
- No behavioral change: both paths return `GetMissingObject()` for absent keys
Closes #547
## Test plan
- [x] `uv run pytest -vvs tests/python` -- 2088 passed, 38 skipped, 3 xfailed (no new failures)
- [x] Pre-commit hooks pass (clang-format, ASF header, file types, etc.)
--
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: discuss-archive-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org
Re: [PR] perf(container): use iterator lookup instead of exception handling in Map/Dict [tvm-ffi]
Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen merged PR #548:
URL: https://github.com/apache/tvm-ffi/pull/548
--
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: discuss-archive-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org