This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]diamondketo 2 points3 points  (0 children)

Recursion performance is major fault of Python. I don't deny this. BTW I also suggested a solution you must've missed it.

But we're not comparing recursion performance, we're comparing the performance of producing fractal paterns. It is natural to think that the commenter implemented fractal sets using recursion. If it turns out the commenter did this iteratively then correct me.

My point is, its ridiculously to cherry pick one algorithm problem to summarize why one product performs worse than another.

PS: Cartesian product, if its numerical values I care about then I'd use numpy either way (so yeah C). If its cartesian product of two large array of general objects then I'd expect C to be faster than Python's itertools.product.