3 ms·
> That's not really a valid argument, because it depends on how they went about it. They went about it by adding mutexes around the reference counters (as oppo
by falcolas 13y ago
> That's not really a valid argument, because it depends on how they went about it.
They went about it by adding mutexes around the reference counters (as opposed to using a separate mark & sweep GC, which has it's own downsides, as displayed by the JVM). This resulted in somewhat increased performance of multi-threaded applications, at the cost of single threaded applications.
> And, from the speed and design of CPython, we know that they are not V8-level or JVM-level competent interpreter/VM writers.
The biggest problem that V8/JVM (i.e. JIT) style interpreters have, when interpreting the Python language, is that JIT compilation is not really possible (or rather, exceptionally difficult). It's simply not possible to say that any given object in Python will remain it's currently defined type, or that an underlying method will not change meaning as execution continues.
one + two
can (and does) change it's meaning dynamically during the execution of a Python script, and simply optimizing away the __add__ lookups will bite you in the ass.
PyPy is currently trying to come up with a JIT compiler, and they're having remarkably good success. Rather than ragging on Python, try supporting them instead.
- coldtea 13y ago>The biggest problem that V8/JVM (i.e. JIT) style interpreters have, when interpreting the Python language, is that JIT compilation is not really possible (or rather, exceptionally difficult). It's simply not possible to say that any given object in Python will remain it's currently defined type, or that an underlying method will not change meaning as execution continues. The same thing holds for JS. And yet, they have tons of heuristics to counter it. Not to mention that most objects really don't change anyway. >one + two can (and does) change it's meaning dynamically during the execution of a Python script, and simply optimizing away the __add__ lookups will bite you in the ass. That's not the case for over 90% of the code I've seen in Python. Even if it DOES use operator overloading.