You are making exactly my point, today's CPUs are so sophisticated for memory layout and access patterns as you put it, that "strict" typing in a language have no impact on the code execution performance, it will be all optimized by the CPU. The "strict" type will have no impact on such performance.
now are we confusing native types with "process" ? the native type allocation would go through a few process and it might take a bit more "RAM" to process but again it has no significant impact on the speed of the code. The type will not be "64 bytes" as you put it, a few objects might be created in between but they will be automatically destroyed. In terms of process, yes, it would take more time, but not significant enough to be meaningful outside of a lab test. Good point about the JIT for Python, maybe someone is already working on one.
You are speaking old school programming, you can't think like this anymore, execution at the CPU level will be very different from what you "think" it will do. It's all optimized at the core. See below my argument.
it doesn't matter in today's CPU because it's something we can't control and something we know will be optimized properly automatically by the CPU. Speaking of cycles in programming like we used to in the good old days is no longer possible, simply because the CPU has a life of its own and will optimize it all at the end, and even the compiler is no longer "writing" for the CPU, but simply "piping" instructions that the CPU will re-order itself. The CPU is in control, not us or the compiler or even the syntax of the programming language.
it doesn't matter in today's CPU because it's something we can't control and something we know will be optimized properly automatically by the CPU.
Speaking of cycles in programming like we used to in the good old days is no longer possible, simply because the CPU has a life of its own and will optimize it all at the end, and even the compiler is no longer "writing" for the CPU, but simply "piping" instructions that the CPU will re-order itself.
Some of the points you are raising to defend python are not completely correct, but other than that sure, python is a great language and can be used for trading application as long as you are not in the latency game. The medium frequency swing style ATS (futures) that I have developed in C++ can be rewritten in Python as well. My strategies can even deal with a latency as high as 4 secs and I don’t mind my bracket limit orders sit in the exchange when my ATS is down... Its not a question of “can”, but it’s a matter of “do you want to” and how a person decides is very subjective depending on the requirements and specifications.So stop blaming Python as a poor choice for developing trading apps,
I see what you are trying to say. Intel processor requires the executing software do certain things before its optimization algorithms can kick in and improve performance... take a look at this: http://www.intel.com/content/www/us...-ia-32-architectures-optimization-manual.html
Intel's open source group (ssg or something) and its compiler group ensure that the latest versions of gcc, icc and visual c++ (large intel compiler group works at Redmond) adhere to this optimization techniques. Tailoring the compiler backends for processor optimizations is a herculean effort. Intel has a team of 300 developers just to do this. Now, if CPU has to be utilized optimally, python inventor (who currently works for Google) should also be leading this… I have not looked at python’s source code and so I can’t comment on it, but if such an effort was to be made, it’s a huge effort as far as I can tell… I am not aware of any such effort other than what Intel has initiated.
Not true! Not sure how you concluded that cycles are “old school” when CPU optimization techniques are bread and butter of every OS/kernel/driver/performance engineer. Intel CPU is not as smart as you think. You can take control over CPUs piping instruction sets… that’s how you achieve spinlock concurrency. We do this all the time using memory barriers and a bunch of other techniques to prevent CPU from doing whatever it does and have the CPU execute our algorithms (instead of its)… that’s how you get performance in high performance computing applications.
Some of the points you are raising to defend python are not completely correct, but other than that sure, python is a great language and can be used for trading application as long as you are not in the latency game. The medium frequency swing style ATS (futures) that I have developed in C++ can be rewritten in Python as well. My strategies can even deal with a latency as high as 4 secs and I don’t mind my bracket limit orders sit in the exchange when my ATS is down... Its not a question of “can”, but it’s a matter of “do you want to” and how a person decides is very subjective depending on the requirements and specifications.
As mentioned in the other answers this depends on the run-time system as well as the task at hand. So the standard (C)Python is not necessarily slower than Java or C#. Some of its modules are implemented in C. Thus combining speed of a native implementation with Python's language.
We did a small experiment: We compared the execution time of a Factorial computation in different languages. The test was actually intended to evaluate the performance of arbitrary-precision integers implementations.
The bar chart shows the results. Python is the clear winner. As far as I know Python uses the Karatsuba-algorithm to multiply large integers, which explains the speed.