The "www" on a web page refers to the common name for the subset of the Domain Name System (DNS) used to refer to web pages on the World Wide Web (World Wide Web). Originally, "www" was used to indicate that a particular address was a server that hosted web pages and to differentiate web pages from other types of services that a server might provide, such as FTP (File Transfer Protocol) or SMTP (Simple Mail Transfer Protocol).
Nowadays, the use of "www" is more a matter of preference and usually has no relevance to the function of the website. Most websites can be accessed either with the use of "www" (e.g., www.example.com) or without it (e.g., example.com).
Regarding the loading speed and the ranking on Google, the presence or absence of "www" in the domain name does not directly affect these factors. The loading speed of a website depends on many factors, such as the quality of the code, the quality of the website hosting, the volume of content and other network performance factors. Search engines, such as Google, rank websites based on many factors, but the presence or lack of "www" is not critical to this.
In summary, it is purely a matter of preference whether you want "www" to be included in your domain name or not. It does not affect the loading speed of your website or its Google ranking.
Cases to watch out if the url will be with www or without www:
Regarding the registration of a URL at Google Analytics and in Google Search Console, you have to note the difference in the format of the URL when the "www." at the beginning.
Usually, websites can be accessed both in the form of "www.example.com" as well as in the form "example.com". These two formats are considered different URLs by the servers, despite the fact that they refer to the same website.
To register with Google Analytics, you need to decide which format you want to use (with or without the "www.") and stick to this format in all your reports. This can be done through your Google Analytics profile settings.
As far as Google Search Console is concerned, you can enter both forms of the URL (with and without the "www.") to make sure that the reports cover all possible variations. In Google Search Console, you can add both "www.example.com" and "example.com" as your owner.
Summarizing, for inclusion in Google Analytics, you must select a URL format (with or without the "www.") and stick to this format. In Google Search Console, you can add both formats to cover all possible variations.
Image by vectorjuice on Freepik