Am 10.01.2014 14:05, schrieb Igor: > Hello Patrick, > > Friday, January 10, 2014, 4:39:59 PM, you wrote: > >> No, Python isn't slow. >> Bad code is bad. You can write bad code in any language. > > Are you sure? Take a look here: > > http://benchmarksgame.alioth.debian.org/u32q/benchmark.php?test=all&lang=python3&lang2=gpp&data=u32q > > of course these stats are all so fake, and you may not belive them. > > I've been using C/C++ since school it's fast, even bad code is working fast. > > I WOULD NEVER BELIVE PYTHON IS AS FAST AS C++ with math algorithms
You do realize, that we are not doing math (read: number crunching) here? And again: What is needed is streamlining the algorithms (discussion on that already started as far as I could notice). An algorithm in O(n³) is always¹ worse than O(n). The constant factor added by the language difference is of no interest. > It's crazy that you're even trying to state it. Take a look at what > Python is producing in disasm and then look at it in G++. For a larger project, it often is more important to have readable and maintable code opposed to getting the last bit of performance. And Python is _far_ more readable and concise than C or C++ (imho). Due to lack of typechecking, I'm not so sure when it comes to maintainability though (there are test suites of course). - René ¹ For a large enough n.