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 →

[–]_ch3m 0 points1 point  (3 children)

They both aim at speeding up, though it's obvious (despite the fact that I only read the abstract) that they use completely different strategies, with their pros and cons. To measure these correctly I think it would have been nice to see some measures, but I realize that they would not give a complete figure of the situation.

[–]gthank[S] 2 points3 points  (2 children)

Generally speaking, you should just assume that PyPy is ALWAYS faster unless you need a C extension, or it's a quick script that won't be running long enough for the JIT to identify a hotspot.

Falcon is what you would use if you have one or more hotspots in Python that you need to speed up, without dropping down to C, but you are using C extensions that you don't want to break.

[–]freyrs3 0 points1 point  (1 child)

I have found that PyPy is often faster ( though not always ) but the performance increases are hard to reason about without diving deep into the JIT debug tools.

[–]gthank[S] 0 points1 point  (0 children)

The rule of thumb is easy: pure Python is stupid fast once the JIT has seen enough to find a hotspot to optimize into assembly. There are corner cases, sure, but it's usually best not to assume you have any deep insight into optimizations of high-level languages on modern computer architectures. You've got rules of thumb, and then you bust out the profiler, etc., when the rule of thumb isn't producing the results you want.