Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why couldn't they use PyPy? The GC for that has higher throughput.


The easy answer is C extensions. PyPy does not support C extensions, and thereby does not support a wide range of native, accelerated libraries. Facebook infra is heavily dependent on wrapping C/C++ libraries (like Thrift) for use in many languages, and not having C extensions (or Cython) would cut off a large portion of our shared codebase.


Pypy does support C extensions, but it has to somewhat emulate the cpython API so it's rather slow and doesn't work for 100% of modules.

If your C library uses FFI or Ctypes it'll work perfectly fine under pypy.


The more important question is whether PyPy's GC uses intrusive data structures to maintain the metadata for each object. If it does the same thing as CPython, just faster, then the process would run out of memory faster as the GC writing to COW pages converts them into owned memory.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: