News for hackers. Stuff that matters.
Re:Why Python Is Slow: Looking Under the Hood by slantedview on Tuesday November 18, 2014 @04:27PM (#8626463)
"it's slow"

"just write a C extension"

"but then why use Python?"

Re:Why Python Is Slow: Looking Under the Hood by AlexeyBrin on Tuesday November 18, 2014 @04:33PM (#8626494)

    "it's slow"
    "just write a C extension"
    "but then why use Python?"
Because you typically need to write a C extension for like 2% or your code, while you could keep the remaining 98% in an easier to write (and more compact) language.
Re:Why Python Is Slow: Looking Under the Hood by bsder on Tuesday November 18, 2014 @05:15PM (#8626732)
Because the C extension you need has probably already been written.

This is the same kind of network effect that drove Perl usage for some many years. CPAN had it. Even if I didn't want to use Perl, CPAN was overwhelmingly compelling.

Python has since taken on that mantle.

Re:Why Python Is Slow: Looking Under the Hood by nightcracker on Tuesday November 18, 2014 @04:31PM (#8626483)
Because 90% of the runtime is spent in 10% of the code.
Re:Why Python Is Slow: Looking Under the Hood by bch on Tuesday November 18, 2014 @04:33PM (#8626492)
Because beautiful control structures and a REPL ?
Re:Why Python Is Slow: Looking Under the Hood by slantedview on Tuesday November 18, 2014 @07:23PM (#8627364)
I'm not sure that these are compelling reasons to use Python, given the alternatives.

Squeezing performance out of Python often involves dropping down to C. This isn't the case with the competition.

Re:Why Python Is Slow: Looking Under the Hood by pjmlp on Tuesday November 18, 2014 @05:55PM (#8626940)
There are many languages that offer that alongside an AOT compiler to native code.
Re:Why Python Is Slow: Looking Under the Hood by bch on Tuesday November 18, 2014 @07:26PM (#8627377)
Well sure -- but I guess considering Python at all suggests you want or need to. Python control and the REPL are _fine_ reasons to use it. To be clear though, I'm a Tcl-er, but I use it in exactly this context. I meant my comment to stand along the other sibling comments.