[all-commits] [llvm/llvm-project] 244cf8: [mlir][python] Small optimization to mlirApiObject...

Peter Hawkins via All-commits all-commits at lists.llvm.org
Fri Mar 14 08:11:04 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 244cf89f143a4fa09494280dba4a49d4cff007f6
      https://github.com/llvm/llvm-project/commit/244cf89f143a4fa09494280dba4a49d4cff007f6
  Author: Peter Hawkins <phawkins at google.com>
  Date:   2025-03-14 (Fri, 14 Mar 2025)

  Changed paths:
    M mlir/include/mlir/Bindings/Python/NanobindAdaptors.h

  Log Message:
  -----------
  [mlir][python] Small optimization to mlirApiObjectToCapsule. (#131160)

Call nb::getattr(...) rather than using nb::hasattr() and .attr(). Saves
a Python string allocation and a dictionary lookup when using a recent
nanobind.

Optimization only, no changes in behavior expected.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list