News for hackers. Stuff that matters.
Re:How Many Lines of C It Takes to Execute a and B in Python? by andai on Monday December 11, 2023 @04:38PM (#38605867)
Thanks. That's fascinating about Ruby, I'll have to look into that.

I'm not an expert on Python but I don't see how Python is significantly more dynamic than e.g. JavaScript. I think PyPy and JS performance is comparable (or at least within the same order of magnitude), so I think it largely comes down to implementation, i.e. prioritizing performance.

I think if it had been Python (or Ruby for that matter) in the browser instead of JS, it would run about as fast as JS does today.

Re:How Many Lines of C It Takes to Execute a and B in Python? by lmm on Monday December 11, 2023 @05:28PM (#38606342)
> I'm not an expert on Python but I don't see how Python is significantly more dynamic than e.g. JavaScript.

JS has much less in the way of magic methods that can affect "normal" object behaviour, and it doesn't have metaclasses in the way that Python does at all. Most of this customization goes unused most of the time, but the runtime still has to handle it in case it's being used this time.