HomePhabricator

improve BuiltinEnum.contains

Authored by alangenfeld on Tue, Nov 5, 7:39 PM.

Description

improve BuiltinEnum.contains

Summary: py-spy revealed that this contains method is suprisingly slow - though not with a granularity that reveals exactly why. Probably comparing with all the dunder methods.

Test Plan:
pytest python_modules/dagster-graphql/dagster_graphql_tests/graphql/ & sudo py-spy record --format speedscope --output tests.scope -p $!

See that contains no longer ranks top of the list of self-time

Reviewers: max, schrockn

Reviewed By: max

Differential Revision: https://dagster.phacility.com/D1363

Details

Committed
alangenfeldTue, Nov 5, 9:06 PM
Reviewer
max
Differential Revision
D1363: improve BuiltinEnum.contains
Parents
R1:a236018922b5: Flesh out type system documentation
Branches
Unknown
Tags
Unknown