For performance: Click each button and see the result appearing next to the button.
For memory: Open Web browser devtool Memory or Performance tab, start the capturing, click each button, stop the capturing, and see the result of memory cunsomption or memory allocation.