Re:Python Is Not C
by bite_victim on Thursday July 02, 2015 @01:06PM
(#9820175)
I am a clumsy individual. Dropping the int call resulted in shaving 3.5 seconds. But how is this possible?! It's ridiculous, really!
[ Parent
| on HN ]
Re:Python Is Not C
by maxerickson on Thursday July 02, 2015 @01:33PM
(#9820337)
The CPython interpreter is pretty naive, so it more or less does what you tell it to.
Re:Python Is Not C
by bite_victim on Thursday July 02, 2015 @01:40PM
(#9820379)
PHP is no better, if you add an intval call it will add almost 4 seconds to the result! This is an extraordinary proof that being a little sloppy can cost you a lot when using interpreted scripting languages!
Also, I am thinking if and how much speed gain could one inject by not using OOP in PHP...