Brython in observable - performance issue

My goal is to use overloaded operators. Without them, arithmetic looks uninteresting :

(outPNxy cell at the bottom of the page)

The same task in python looks better, but it is very slow (in my version):

Moving the sliders causes a belated reaction. Perhaps recompiling python to javascript in the outPNxy cell should be a one-off, but I don’t know how to do it.