Commit 0308362
Changed the method ExprOperator::GetSignature to return a shared-ptr
Motivation: The primary goal of this change is to provide efficient access to the operator’s aux_policy without incurring the cost of copying the full signature.
This enables the use of `op.signature.aux_policy` for `ExprView` customisation. It also allows moving the `Validate*Count()` utilities to the `ExprOperator` base class, which was previously avoided because of the performance penalty of signature copying.
---
Benchmark results for future reference:
```python
from arolla import arolla
_1 = arolla.int32(1)
_2 = arolla.int32(2)
op = arolla.M.math.add
%timeit arolla.abc.get_operator_signature(op) # 356ns -> 313ns
%timeit arolla.abc.aux_bind_op(op, _1, _2) # 1.05us -> 1.02us
%timeit arolla.abc.aux_eval_op(op, _1, _2) # 442ns -> 405ns
```
PiperOrigin-RevId: 858086299
Change-Id: I764a2d50e6db68367cd0d4c94c0a4c8396eb13981 parent 2044cdb commit 0308362
File tree
2 files changed
+9
-9
lines changed- py/koladata
- expr
- operators
2 files changed
+9
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
193 | 193 | | |
194 | | - | |
195 | | - | |
| 194 | + | |
| 195 | + | |
196 | 196 | | |
197 | | - | |
198 | | - | |
| 197 | + | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
737 | | - | |
| 737 | + | |
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| |||
0 commit comments