Yes, it does.
This has been confirmed by nginx’s Konstantin Pavlov: https://github.com/nginxinc/docker-nginx/issues/540#issuecomment-824651057
For best performance, compile two binaries and swap them for each purpose.