-
Notifications
You must be signed in to change notification settings - Fork 3
[Performance] Replace isinstance with attribute checks in hot code paths #535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ance-critical code
|
Is this solution acceptable to you @Roger-luo? |
|
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
This looks evil... but I get why we are doing it. |
…ths (#535) Speeds up my large kernel use case by 14% from 453s to 390s (90s to 34s of isinstance checks).
|
Wait @Roger-luo! You were too fast for me and merged with failing pyright type checking. Type check fix: https://github.com/QuEraComputing/kirin/tree/cduck/isinstance-main EDIT: Still testing this fix... |
Speeds up my large kernel use case by 14% from 453s to 390s (90s to 34s of isinstance checks).