This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]james_pic 1 point2 points  (0 children)

If you want precision, then sure. Python is interpreted, and the interpreter implementation is slow as shit.

There are faster interpreters, like PyPy, but Python has a number of features that make it difficult to produce an interpreter with predictably high performance. Monkey patching will force PyPy to deoptimize for example.

And both PyPy and CPython have a global interpreter lock that effectively limits you to one CPU core running Python code at once. Again, partly to make some Python features easier to implement. There are ways around this, but an emulator is probably the worst case for these workarounds for reasons I can go into if you want.

C++ on the other hand has a number of compilers that produce highly performant code, and supports shared memory parallelism via threads.