Aug 022011

I hear debates about the speed of languages all the time. Most people who argue for low-level compiled languages cite that anything can be faster with optimized C. True, but if we put in around the same effort in coding, higher level languages can offer better optimization. Java doesn’t have direct pointer access, and so can offer better compiler and runtime optimization than compiled C/++ in some cases, since the JVM has more control over your memory usage.

This, though, takes the cake:


In general Python, as a dynamically typed language, and PyPy is one of the fastest JIT compilers for Python out there. Even so, Python is generally much slower than an equivalent program in C. However, this article shows that in certain situations, compiled Python can beat C exactly because the programmer is relinquishing some control to the compiler/interpreter.

(via Hacker News)

  One Response to “Python Faster than C”

  1. Great write up, currently learning C/C++ and planned on moving to python next.

    Monko’s Blogs

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>




This site uses Akismet to reduce spam. Learn how your comment data is processed.