Dual rewrite rules (WWW prefix and HTTPS)
Redirecting twice does cause a slight performance impact, but if you are looking to use HSTS then you should use two redirects, as there are some situations where going direct from http://example.com to https://www.example.com would cause issues.

An example is the HSTS preload list, where you must:

2) Redirect from HTTP to HTTPS on the same host, if you are listening on port 80.
https://hstspreload.org/

So you will need to make sure the redirect chain goes:

http://example.com -> https://example.com -> https://www.example.com