A system for heating a liquid, the system comprising at least: - a hydrosonic pump for heating said liquid, - a primary circuit comprising at least: - a storage of said liquid, or a heat exchange unit - a plurality of pipes (31, 32) for mutual connection of said storage or said heat exchange unit with said hydrosonic pump - at least one solenoid valve to open and/or close the liquid circulation within said primary circuit, and - an optimizer connected to and placed downstream of said hydrosonic pump, wherein the connection between said hydrosonic pump and said optimizer is ensured by an internal circuit comprising a delivery pipe and a return pipe; said optimizer cooperating with at least said primary circuit to give and transfer thereto the thermal energy produced by said hydrosonic pump, said optimizer comprising a storage tank: - of reduced volume, intermediate the one of a conventional liquid storage and a hydraulic compensator; - capable of withstanding and working at high pressure; - thermally insulated, characterized by said optimizer comprising at least one sectioning valve configured for controlling the flow rate of said liquid circulating in said hydrosonic pump, placed within the internal circuit preferably along the return pipe of said optimizer, operating and ensuring a temperature gradient ΔToptimizer between an inlet and outlet liquid equal to a threshold temperature gradient ΔTideal between an inlet and outlet temperature of said hydrosonic pump to facilitate maximum efficiency and energy performance. - a hydrosonic pump for heating said liquid, - a primary circuit comprising at least: - a storage of said liquid, or a heat exchange unit - a plurality of pipes (31, 32) for mutual connection of said storage or said heat exchange unit with said hydrosonic pump - a storage of said liquid, or a heat exchange unit - a plurality of pipes (31, 32) for mutual connection of said storage or said heat exchange unit with said hydrosonic pump - at least one solenoid valve to open and/or close the liquid circulation within said primary circuit, and - an optimizer connected to and placed downstream of said hydrosonic pump, the connection between said hydrosonic pump and said optimizer is ensured by an internal circuit comprising a delivery pipe and a return pipe; said optimizer cooperating with at least said primary circuit to give and transfer thereto the thermal energy produced by said hydrosonic pump, said optimizer comprising a storage tank: - of reduced volume, intermediate the one of a conventional liquid storage and a hydraulic compensator; - capable of withstanding and working at high pressure; - thermally insulated, - of reduced volume, intermediate the one of a conventional liquid storage and a hydraulic compensator; - capable of withstanding and working at high pressure; - thermally insulated, characterized by said optimizer comprising at least one sectioning valve configured for controlling the flow rate of said liquid circulating in said hydrosonic pump, placed within the internal circuit preferably along the return pipe of said optimizer, operating and ensuring a temperature gradient ΔToptimizer between an inlet and outlet liquid equal to a threshold temperature gradient ΔTideal between an inlet and outlet temperature of said hydrosonic pump to facilitate maximum efficiency and energy performance.