facebook / hhvm

A virtual machine for executing programs written in Hack.
https://hhvm.com
Other
18.14k stars 2.99k forks source link

Turn ZendPack into a singleton #9334

Closed jchaffraix-slack closed 1 year ago

jchaffraix-slack commented 1 year ago

ZendPack holds a bunch of maps based on the machine's endianness. Those are not going to change during HHVM's lifetime so we can avoid allocating and recomputing those.

Allocating ZendPack accounts for 0.5 - 0.7% of the traces under perf for workloads heavy in pack/unpack.

facebook-github-bot commented 1 year ago

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 year ago

This pull request has been merged in facebook/hhvm@8df21f6319bf5b2f3cf31e6e787369afc29cef4c.