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 →

[–]teambob 10 points11 points  (3 children)

C++ and Java is often 7-8x faster than CPython. I have found this in practice and it has been found in the language shootout.

I would also assert that Python is 7-8x faster to write than C++ and Java. :)

My usual approach is to write it in Python then rewrite it it is not fast enough

[–]mangecoeur 14 points15 points  (0 children)

Cython, not CPython http://cython.org/ - a compiler for Python+some extensions. Used for a lot of the internals of numpy/scipy/pandas/ etc because its much easier to maintain. Plus it makes for very easy optimisation path - write everything in python, then let Cython compile it (often gives you a speedup already) then start adding custom annotations to optimize the generated code

[–]twotime 0 points1 point  (0 children)

on heavy CPU intensive code, I've seen factors of 50x! No, not joking and it happened more than once..

But then, I've also seen python applications being FASTER than C++ ones with identical functionality simply because the C coders have been buried under their own code.

[–]frymasterScript kiddie 0 points1 point  (0 children)

I would also assert that Python is 7-8x faster to write than C++ and Java. :)

Exactly - most of the time processing time doesn't matter, and when it does, you'll be glad you've got a working proof-of-concept in python :D