On Thu, Sep 16, 2021 at 3:17 AM Mostowski Collapse <janbu...@fastmail.fm> wrote: > > I really wonder why my Python implementation > is a factor 40 slower than my JavaScript implementation. > Structurally its the same code. >
Very hard to know. Your code is detailed and complicated. Do they produce identical results? Are you using the same sort of floating-point data everywhere, or is one integer and the other float? What's going on with all the globals, the continuations, etc? My suspicion is that you're trying to write weird, wonky Python code, and then are surprised that it doesn't perform well. ChrisA -- https://mail.python.org/mailman/listinfo/python-list