$ cat foo.py
import pytato as pt
$ time python foo.py
real 0m1.328s
user 0m2.378s
sys 0m0.131s
This is what pyinstrument has to say:
1.639 <module> foo.py:1
└─ 1.639 <module> pytato/__init__.py:1
├─ 0.981 <module> pytato/analysis/__init__.py:1
│ ├─ 0.651 <module> loopy/__init__.py:1
│ │ [33 frames hidden] loopy, pymbolic, <built-in>, dataclas...
│ ├─ 0.131 NodeCountMapper.wrapper pymbolic/mapper/optimize.py:276
│ │ [22 frames hidden] ast, _ast_unparse
│ ├─ 0.110 <module> pytato/transform/__init__.py:1
│ │ └─ 0.100 TopoSortMapper.wrapper pymbolic/mapper/optimize.py:276
│ │ [11 frames hidden] pymbolic, ast, <built-in>
│ └─ 0.062 <module> pytato/array.py:1
│ └─ 0.041 Placeholder.map_cls pytato/array.py:342
│ └─ 0.025 Array._augment_array_dataclass pytato/array.py:371
│ └─ 0.022 compile <built-in>
├─ 0.233 <module> numpy/__init__.py:1
│ [15 frames hidden] numpy
├─ 0.087 <module> pytools/__init__.py:1
│ [8 frames hidden] pytools, importlib, logging, traceback
├─ 0.081 <module> pytato/target/loopy/codegen.py:1
│ └─ 0.075 <module> pytato/codegen.py:1
│ └─ 0.070 NamesValidityChecker.wrapper pymbolic/mapper/optimize.py:276
│ [5 frames hidden] ast
├─ 0.078 <module> pytato/distributed/partition.py:1
│ └─ 0.072 _MaterializedArrayCollector.wrapper pymbolic/mapper/optimize.py:276
│ [6 frames hidden] ast
└─ 0.073 <module> pytato/distributed/verify.py:1
└─ 0.065 _SeenNodesWalkMapper.wrapper pymbolic/mapper/optimize.py:276
[5 frames hidden] ast
If we expect importing pytato to be 5x slower compared to numpy, please close this.
This is what pyinstrument has to say:
If we expect importing pytato to be 5x slower compared to numpy, please close this.