We can extend controller in two ways: using preference and using plugin. But I do not understand that, which one is good and advantages/disadvantages of preference vs plugin.
<preference for="Magento\Checkout\Controller\Index\Index" type="mymodule\Helloworld\Controller\Index\Index" />
<type name="Magento\Catalog\Model\Product">
<plugin name="getname-test-module" type="mymodule\Helloworld\Model\Plugin\Product" sortOrder="10"/>
</type>