3 ms·
The benchmarks are a little bit misleading for some types of code. They do not measure single run code well. In these cases pypy doesn't do as well as when th
by illumen 13y ago
The benchmarks are a little bit misleading for some types of code. They do not measure single run code well. In these cases pypy doesn't do as well as when the JIT has warmed up.
The interpreter is slower than the CPython one. For code which doesn't JIT well, it will go slower with pypy. The firefox JS engine now has a fast interpreter, a quick JIT, and a more optimizing one. This means the baseline performance is better in CPython, so if pypy manages to make their interpreter better baseline performance will get better.
The memory management in CPython is much more predictable and deterministic since it is using reference counting and not GC. The pypy GC may be faster in many circumstances however. IO in pypy can be slower sometimes if the GC is unhappy with the way you're doing it. Especially if you're leaving files open, or reading in different sized chunks of data.
The new pypy release speeds up a few different types of real world code however. XML processing, DB processing, and stackless async code (eventlet, and greenlet) are three areas where pypy has improved with this release. Numpy based code is another area where pypy has gotten better with this release.
In short, pypy still has many areas where it could improve... but with each release is getting better at more types of real code :)
For run-once, and latency or memory sensitive code the benchmarks may be a bit misleading.
- kenko 13y ago"The firefox JS engine now has a fast interpreter, a quick JIT, and a more optimizing one. This means the baseline performance is better in CPython" Huh?
- lepacheco 13y agoFrom what I understand, there are three stages: - interpreted - If run 'enough' times, the code is JIT compiled (fast compilation) - If run 'enough' times again, it is JIT compiled with the most optimizing compiler (slow compilation)
- kenko 13y agoThe question is what the firefox JS interpreter has to do with baseline performance in CPython.