How to improve the performance of SVG animation on macOS?

I have pasted a SVG example on Codepen.

The code is just a simple SVG animation with multiple rectangles moving. But it consumes 20%-30% of the CPU on macOS browsers (Safari, Chrome, Firefox). Are there anything I can do to make this SVG running smooth?

Thanks in advance