Get is comparable attribute list programmatically in magento 2.

Magento 2 Compare product is one of the native features available with Out of the box. You can compare multiple products from listing and product pages with a click on compare link.

If you want to know about get all the is_comparable attribute lists using programmatically you need to use Magento\Eav\Api\AttributeRepositoryInterface Interface.

Comparable on Storefront Set to Yes used for compare products in a storefront.

comparable on store front Magento

I have given a demo using Block file,

From template file,

The result for Magento 2.3 With sample data installed, All is_comparable attribute code,