Optimize builtin handling (#122035)
Summary:
Improves `benchmarks/dynamo/microbenchmarks/dynamo_microbenchmarks.py`
from 7.3s to 6.7s.
X-link: https://github.com/pytorch/pytorch/pull/122035
Approved by: https://github.com/Skylion007
ghstack dependencies: #122032, #122033, #122034
Reviewed By: huydhn
Differential Revision: D55046183
Pulled By: jansel
fbshipit-source-id: caca4f71603523d1fb0044ba3ebce14ad53cdc27