top | item 45378048

(no title)

marky1991 | 5 months ago

Pypy's tracing JIT has worked pretty well for years, so that doesn't seem universal. I admit I have fairly low expectations on a JIT succeeding (in any meaningful fashion) in cpython given the constraints that it currently has, but I'm generally a skeptic, so maybe i'm being overly pessimistic.

discuss

order

pizlonator|5 months ago

What does “worked pretty well” really mean though?

When we talk about JS or Java JITs working well, we are making statements based on intense industry competition where if a JIT had literally any shortcoming then a competitor would highlight it in competitive benchmarking and blog posts. So, the competition forced aggressive improvements and created a situation where the top JITs deliver reliable perf across lots of workloads.

OTOH PyPy is awesome but just hasn’t had to face that kind of competitive challenge. So we probably can’t know how far off from JS JITs it is.

One thing I can say is when I compared it to JSC by writing the same benchmark in both Python and JS, JSC beat it by 4x or so.

acdha|5 months ago

I think the Java JITs are a better comparison because the workload is more similar: JavaScript is weird for how it’s expected to start in a fraction of a second and soak up a huge bolus of code which may substantially never be used whereas most of the performance-sensitive Python code stabilizes quickly and loads what it uses really early on.