Google now lets you compare phone specifications in search results
As far the screenshot below can tell, the comparison shows side by side the specifications of the device you want to compare. So, Basically you type in the device names in this manner
eg: Huawei mate 10 vs Iphone x.
The result then shows displaying the compared specs. This revelation came from Androidpolice, which stated that so far, the only two phones that can be compared now is the Pixel 2 and Pixel 2 XL. I have not seen the search result displayed this way yet. This goes to prove that it is a feature on test. The device that can be compared will so be populated.
So try out this search query “Pixel 2 vs Pixel 2XL” and see what you get.