Wrap direct decl parser decls in Rc to reduce copying.
commit1bbaef5fa5f4e6fceb59c411d05b87337eb70e24
authorJulia Pitts <jupi@fb.com>
Mon, 11 Nov 2019 23:34:19 +0000 (11 15:34 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 11 Nov 2019 23:38:45 +0000 (11 15:38 -0800)
treebde7c5ff7ba1efcb7ba2c768c78533838b9afe73
parent5d3e3e9a89a4bf84eae2f2bab5671521c90bbe3a
Wrap direct decl parser decls in Rc to reduce copying.

Summary: Profiling revealed that cloning the decls was a fairly large chunk of the direct decl parser latency, so we can wrap them in `Rc`s to make cloning involve incrementing a single int instead of copying the entire struct.

Differential Revision: D18361716

fbshipit-source-id: c6e29ddac9fb0518a9f1b93c62026a0395474d0e
hphp/hack/src/decl/direct_decl_parser.rs
hphp/hack/src/decl/direct_decl_smart_constructors.rs