| Well, C/Fortran/C++/ASM are a PITA when it comes to dynamic structures like the one for handling configurations. Plus authors missed that boxing in python has a tendency to fragment data in a non controlable way in the memory thus making the use of L1/L2/L3/mem (on x86) or other memory architecture with similar layout very hard to use. If you code often you know the 80/20 rule:
80% of your code is the setup preparing for the 20% of heavy lifting. Numpy (which relies on Fortran) is a nice Proof that when done correctly python is really useful. A computing a Moving average in pure python is 10 000 times slower than using numpy (especially if you use FFT). So ... I am saying since python (like Tcl or Perl) is a good language for doing FFI (foreign function integration) it should be used this way. And thanks to the often unfairly hated GIL it enables to use un-thread safe foreign language library in a thread safe way. All being said and done, if python used this way is slow, I dare say it is because some coders do not understand how to build there data/execution flow. And this is not language dependent, but a question of coder. I thought they were 10x coders in the past. I recently realized there are /10 coders in fact. The one that are pissed at coding when «it does not work the way it should» and expect language to be magically doing most of the job without learning. The 1x coders on the other hands are boring, slow coders and accept that when the «stuff» is not behaving the right way, it may not be the stuff that is not working, but him/her that have a misconception. 1x coder is not a state, it is a trajectory that can degrade or improve with new challenge and poor/good state of mind, hence the misconception on 10x. |