Commit e30b703
authored
[mlir:python] Construct PyOperation objects in-place on the Python heap. (#123813)
Currently we make two memory allocations for each PyOperation: a Python
object, and the PyOperation class itself. With some care we can allocate
the PyOperation inline inside the Python object, saving us a malloc()
call per object and perhaps improving cache locality.1 parent d7fb4a2 commit e30b703
2 files changed
+22
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1199 | 1199 | | |
1200 | 1200 | | |
1201 | 1201 | | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
1202 | 1218 | | |
1203 | 1219 | | |
1204 | 1220 | | |
1205 | 1221 | | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
1213 | 1225 | | |
1214 | 1226 | | |
1215 | 1227 | | |
1216 | | - | |
| 1228 | + | |
1217 | 1229 | | |
1218 | 1230 | | |
1219 | 1231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
708 | | - | |
709 | 708 | | |
| 709 | + | |
| 710 | + | |
710 | 711 | | |
711 | 712 | | |
712 | 713 | | |
| |||
0 commit comments