The Python program in this example is about 6 times faster than the BASH program.
Python is a little slower in this example as it is only 3 times faster than BASH
Python is roughly 5.5 times faster than BASH in this test.
With Python lists being 29 times faster and Python dictionaries being 23.7 times faster using BASH for
any kind of sequential data manipulation is unacceptable (unless it is very small amounts of data).
Since in this simple function calling program Python is 11.77 times faster than BASH, BASH is therefore
restricted to linear program whereas Python is only 48% (verses the 476% of BASH) slower than the non function calling program and for that reason is a very good structured programming language (keep in
mind that 10000 function calls were made in both programs).
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn